diff --git a/src/ToolbarService.php b/src/ToolbarService.php index fc548291..b77c272a 100644 --- a/src/ToolbarService.php +++ b/src/ToolbarService.php @@ -102,7 +102,13 @@ public function registry(): PanelRegistry */ public function isEnabled(): bool { - if (defined('PHPUNIT_COMPOSER_INSTALL') && !$GLOBALS['FORCE_DEBUGKIT_TOOLBAR']) { + if (!isset($GLOBALS['FORCE_DEBUGKIT_TOOLBAR'])) { + $GLOBALS['FORCE_DEBUGKIT_TOOLBAR'] = false; + } + if ( + defined('PHPUNIT_COMPOSER_INSTALL') && + !$GLOBALS['FORCE_DEBUGKIT_TOOLBAR'] + ) { return false; } $enabled = (bool)Configure::read('debug')