aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-20 22:14:20 +0100
committerGitHub <noreply@github.com>2017-11-20 22:14:20 +0100
commitfe3f094127abb947520fa3464dfa1883043486ee (patch)
treed60eeaa06342dfed179e0f2570a211eb31a8819c
parentc277800ba419a302bde39b2475aee732331bbfa7 (diff)
parent6fd51426bf19817e16f85014ce8f28d33e9f7913 (diff)
downloadnextcloud-server-fe3f094127abb947520fa3464dfa1883043486ee.tar.gz
nextcloud-server-fe3f094127abb947520fa3464dfa1883043486ee.zip
Merge pull request #7230 from nextcloud/fix-autoload-section-failure
Remove wrong entry in admin_settings that causes 500
-rw-r--r--lib/private/Settings/Manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 6da499c31c4..cd0af5e7bb2 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -32,6 +32,7 @@ namespace OC\Settings;
use OC\Accounts\AccountManager;
use OCP\App\IAppManager;
use OCP\AppFramework\QueryException;
+use OCP\AutoloadNotAllowedException;
use OCP\Encryption\IManager as EncryptionManager;
use OCP\IConfig;
use OCP\IDBConnection;
@@ -471,6 +472,10 @@ class Manager implements IManager {
$settings[$row['priority']][] = $this->query($row['class']);
} catch (QueryException $e) {
// skip
+ } catch (AutoloadNotAllowedException $e) {
+ // skip error and remove remnant of disabled app
+ $this->log->warning('Orphan setting entry will be removed from admin_settings: ' . json_encode($row));
+ $this->mapper->remove(Mapper::TABLE_ADMIN_SETTINGS, $row['class']);
}
}