summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-04-11 14:06:11 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-11 14:06:11 +0200
commitddbb9b7ec4df7654d471808ca7d7ee4ecb069471 (patch)
treee28bb13441c5563a786a0647b0fd4f1e57c3a122
parent329849f2c2431bc797dff19a2e51b25e7ee961de (diff)
downloadnextcloud-server-ddbb9b7ec4df7654d471808ca7d7ee4ecb069471.tar.gz
nextcloud-server-ddbb9b7ec4df7654d471808ca7d7ee4ecb069471.zip
Catch the AutoloadNotAllowedException also for legacy jobs (#23901)
* same as #18839 for legacy jobs * avoids spamming the log with useless entries
-rw-r--r--lib/private/backgroundjob/legacy/regularjob.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/backgroundjob/legacy/regularjob.php b/lib/private/backgroundjob/legacy/regularjob.php
index 8e8b6634c11..aedd6ef657a 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;
}
}
}