Skip to content

Commit 9069d30

Browse files
committed
Keep dto interface optional at runtime
1 parent c5f851e commit 9069d30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Model/Table/QueuedJobsTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function createJob(string $jobTask, array|object|null $data = null, array
205205
$config = $this->createConfig()->fromArray($config);
206206
}
207207

208-
if ($data instanceof FromArrayToArrayInterface) {
208+
if (interface_exists(FromArrayToArrayInterface::class) && $data instanceof FromArrayToArrayInterface) {
209209
$data = $data->toArray();
210210
} elseif (is_object($data) && method_exists($data, 'toArray')) {
211211
$data = $data->toArray();

0 commit comments

Comments
 (0)