diff --git a/lib/private/backgroundjob/legacy/regularjob.php b/lib/private/backgroundjob/legacy/regularjob.php index 8e8b6634c1..aedd6ef657 100644 --- a/lib/private/backgroundjob/legacy/regularjob.php +++ b/lib/private/backgroundjob/legacy/regularjob.php @@ -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; } } }