summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/backgroundjob/joblist.php4
-rw-r--r--lib/private/backgroundjob/legacy/queuedjob.php4
-rw-r--r--lib/private/backgroundjob/legacy/regularjob.php4
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index 6641097cf90..211d7e9abfc 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -152,6 +152,10 @@ class JobList implements IJobList {
if ($class === 'OC_Cache_FileGlobalGC') {
$class = '\OC\Cache\FileGlobalGC';
}
+ if (!class_exists($class)) {
+ // job from disabled app or old version of an app, no need to do anything
+ return null;
+ }
$job = new $class();
$job->setId($row['id']);
$job->setLastRun($row['last_run']);
diff --git a/lib/private/backgroundjob/legacy/queuedjob.php b/lib/private/backgroundjob/legacy/queuedjob.php
index 2bc001103b8..c5705abb467 100644
--- a/lib/private/backgroundjob/legacy/queuedjob.php
+++ b/lib/private/backgroundjob/legacy/queuedjob.php
@@ -13,6 +13,8 @@ class QueuedJob extends \OC\BackgroundJob\QueuedJob {
$class = $argument['klass'];
$method = $argument['method'];
$parameters = $argument['parameters'];
- call_user_func(array($class, $method), $parameters);
+ if (is_callable(array($class, $method))) {
+ call_user_func(array($class, $method), $parameters);
+ }
}
}
diff --git a/lib/private/backgroundjob/legacy/regularjob.php b/lib/private/backgroundjob/legacy/regularjob.php
index d4cfa348cea..eb85a30b4be 100644
--- a/lib/private/backgroundjob/legacy/regularjob.php
+++ b/lib/private/backgroundjob/legacy/regularjob.php
@@ -10,6 +10,8 @@ namespace OC\BackgroundJob\Legacy;
class RegularJob extends \OC\BackgroundJob\Job {
public function run($argument) {
- call_user_func($argument);
+ if (is_callable($argument)) {
+ call_user_func($argument);
+ }
}
}