Merge pull request #32666 from nextcloud/fix/background-job-type-check

Check background job type
This commit is contained in:
Christoph Wurst 2022-05-31 19:16:36 +02:00 committed by GitHub
commit 581bb62d9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));