diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2022-05-31 19:16:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 19:16:36 +0200 |
commit | 581bb62d9cdd954c75babc20b27cc111df99f026 (patch) | |
tree | 37848e0aa15a627b52ad65a356076344f0aa67d0 | |
parent | 40fef4a9dbef8e9bbc32237ded816db195f53541 (diff) | |
parent | b17c4a60727ac66e05102399b4b9cdd5ce7cf725 (diff) | |
download | nextcloud-server-581bb62d9cdd954c75babc20b27cc111df99f026.tar.gz nextcloud-server-581bb62d9cdd954c75babc20b27cc111df99f026.zip |
Merge pull request #32666 from nextcloud/fix/background-job-type-check
Check background job type
-rw-r--r-- | lib/private/BackgroundJob/JobList.php | 4 |
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)); |