diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-06 17:08:41 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-02-22 08:25:41 +0100 |
commit | 0c77cd21f94dd9922e0e04ec4c7e99eff9376e07 (patch) | |
tree | a9c413768e4de0b393b44bd2d49f1a4cfeb7b782 /lib/base.php | |
parent | a11ef5134cb4200399e74811bbf9d1100923efcd (diff) | |
download | nextcloud-server-0c77cd21f94dd9922e0e04ec4c7e99eff9376e07.tar.gz nextcloud-server-0c77cd21f94dd9922e0e04ec4c7e99eff9376e07.zip |
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php index 90fa5496200..d5149fc0449 100644 --- a/lib/base.php +++ b/lib/base.php @@ -285,7 +285,7 @@ class OC { public static function checkMaintenanceMode() { // Allow ajax update script to execute without being stopped - if (\OC::$server->getSystemConfig()->getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') { + if (((bool) \OC::$server->getSystemConfig()->getValue('maintenance', false)) && OC::$SUBURI != '/core/ajax/update.php') { // send http status 503 http_response_code(503); header('Retry-After: 120'); @@ -938,7 +938,7 @@ class OC { if (function_exists('opcache_reset')) { opcache_reset(); } - if (!$systemConfig->getValue('maintenance', false)) { + if (!((bool) $systemConfig->getValue('maintenance', false))) { self::printUpgradePage($systemConfig); exit(); } @@ -966,7 +966,7 @@ class OC { // Load minimum set of apps if (!\OCP\Util::needUpgrade() - && !$systemConfig->getValue('maintenance', false)) { + && !((bool) $systemConfig->getValue('maintenance', false))) { // For logged-in users: Load everything if(\OC::$server->getUserSession()->isLoggedIn()) { OC_App::loadApps(); @@ -979,7 +979,7 @@ class OC { if (!self::$CLI) { try { - if (!$systemConfig->getValue('maintenance', false) && !\OCP\Util::needUpgrade()) { + if (!((bool) $systemConfig->getValue('maintenance', false)) && !\OCP\Util::needUpgrade()) { OC_App::loadApps(array('filesystem', 'logging')); OC_App::loadApps(); } |