aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/BackgroundJob/JobList.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index fe65a1879bc..7ab86df8455 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -311,6 +311,10 @@ class JobList implements IJobList {
}
}
+ if (!($job instanceof IJob)) {
+ // This most likely means an invalid job was enqueued. We can ignore it.
+ return null;
+ }
$job->setId((int) $row['id']);
$job->setLastRun((int) $row['last_run']);
$job->setArgument(json_decode($row['argument'], true));