Skip to content
Snippets Groups Projects
Commit ddbb9b7e authored by Morris Jobke's avatar Morris Jobke Committed by Thomas Müller
Browse files

Catch the AutoloadNotAllowedException also for legacy jobs (#23901)

* same as #18839 for legacy jobs
* avoids spamming the log with useless entries
parent 329849f2
No related branches found
No related tags found
No related merge requests found
...@@ -22,10 +22,17 @@ ...@@ -22,10 +22,17 @@
namespace OC\BackgroundJob\Legacy; namespace OC\BackgroundJob\Legacy;
use OCP\AutoloadNotAllowedException;
class RegularJob extends \OC\BackgroundJob\Job { class RegularJob extends \OC\BackgroundJob\Job {
public function run($argument) { public function run($argument) {
if (is_callable($argument)) { try {
call_user_func($argument); if (is_callable($argument)) {
call_user_func($argument);
}
} catch (AutoloadNotAllowedException $e) {
// job is from a disabled app, ignore
return null;
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment