diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-06-26 22:39:40 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-06-26 22:40:12 +0200 |
commit | 437094bbfc4230ed4b8b8cc797738ddd4ef7f1aa (patch) | |
tree | f27dba56f853c44d49c57f77d734f8cb76494642 /lib/private/backgroundjob/joblist.php | |
parent | 5b189315b53b14a51cc6b7b7b94905c66e8bb486 (diff) | |
download | nextcloud-server-437094bbfc4230ed4b8b8cc797738ddd4ef7f1aa.tar.gz nextcloud-server-437094bbfc4230ed4b8b8cc797738ddd4ef7f1aa.zip |
Check if classes/method exists before trying to call them in background jobs
Diffstat (limited to 'lib/private/backgroundjob/joblist.php')
-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 6641097cf90..09bba53edb8 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']); |