Cleanly handle maintenance mode not being configured

This commit is contained in:
Belle Aerni committed 2022-10-23 02:48:40 -07:00
1 parent d66751d24d
commit 38cb5de32c
1 file changed
+2 -1
+2 -1
View File
@@ -345,7 +345,8 @@ class Box_App
*
* @since 4.22.0
*/
if (true === $this->di['config']['maintenance_mode']['enabled']) {
$maintmode = isset($this->di['config']['maintenance_mode']) ? $this->di['config']['maintenance_mode']['enabled'] : false;
if ($maintmode) {
// Check the allowlists
if ($this->checkAdminPrefix() && $this->checkAllowedURLs() && $this->checkAllowedIPs()) {
// Set response code to 503.