Merge pull request #23930 from owncloud/stable9-backport-23901

[stable9] Catch the AutoloadNotAllowedException also for legacy jobs
This commit is contained in:
Thomas Müller 2016-04-12 14:27:17 +02:00
commit 4f5d1e9f60
1 changed files with 9 additions and 2 deletions

View File

@ -22,10 +22,17 @@
namespace OC\BackgroundJob\Legacy;
use OCP\AutoloadNotAllowedException;
class RegularJob extends \OC\BackgroundJob\Job {
public function run($argument) {
if (is_callable($argument)) {
call_user_func($argument);
try {
if (is_callable($argument)) {
call_user_func($argument);
}
} catch (AutoloadNotAllowedException $e) {
// job is from a disabled app, ignore
return null;
}
}
}