Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-09 17:01:02 +0300
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-09 17:01:02 +0300
commitd9a409606fa73011e1f2bd49467b424aca2f33cc (patch)
tree619e68c63bf74d9af741855576e2ac56fd804750
parentf5c39b70d839c1b4ec6bbdfb395a538e24bfe183 (diff)
parent027eaa4b2ce4c838dbb3dce40ba2c56c2b6cb58f (diff)
Merge pull request #24508 from owncloud/backport-23901-app-disabled-on-legacy-job
[8.2] Catch the AutoloadNotAllowedException also for legacy jobs
-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 49a777a1e27..e75d9f7eb3f 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;
}
}
}