Skip to content

Commit

Permalink
Catch the AutoloadNotAllowedException also for legacy jobs (#23901)
Browse files Browse the repository at this point in the history
* same as #18839 for legacy jobs
* avoids spamming the log with useless entries
  • Loading branch information
MorrisJobke authored and DeepDiver1975 committed Apr 11, 2016
1 parent 329849f commit ddbb9b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/private/backgroundjob/legacy/regularjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit ddbb9b7

Please sign in to comment.