Catch the AutoloadNotAllowedException also for legacy jobs (#23901)

* same as #18839 for legacy jobs
* avoids spamming the log with useless entries
remotes/origin/integration_test_favorites
Morris Jobke 10 years ago committed by Thomas Müller
parent 329849f2c2
commit ddbb9b7ec4
  1. 11
      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;
}
}
}

Loading…
Cancel
Save