From 38cb5de32c0f382f98efe696d6aa18b7e4a08022 Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sun, 23 Oct 2022 02:48:40 -0700 Subject: [PATCH] Cleanly handle maintenance mode not being configured --- src/bb-library/Box/App.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bb-library/Box/App.php b/src/bb-library/Box/App.php index a087b225d..e3b919b0a 100644 --- a/src/bb-library/Box/App.php +++ b/src/bb-library/Box/App.php @@ -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.