Skip to content

Commit

Permalink
Catch the AutoloadNotAllowedException also for legacy jobs
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 committed Apr 11, 2016
1 parent c6f65a3 commit 420fe0b
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 420fe0b

Please sign in to comment.