Skip to content

Commit c830c68

Browse files
authored
Merge pull request #941 from cakephp/5.x-fix-warning
5.x: fix warning
2 parents 0bb4002 + 4883ea4 commit c830c68

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/ToolbarService.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ public function registry(): PanelRegistry
102102
*/
103103
public function isEnabled(): bool
104104
{
105-
if (defined('PHPUNIT_COMPOSER_INSTALL') && !$GLOBALS['FORCE_DEBUGKIT_TOOLBAR']) {
105+
if (!isset($GLOBALS['FORCE_DEBUGKIT_TOOLBAR'])) {
106+
$GLOBALS['FORCE_DEBUGKIT_TOOLBAR'] = false;
107+
}
108+
if (
109+
defined('PHPUNIT_COMPOSER_INSTALL') &&
110+
!$GLOBALS['FORCE_DEBUGKIT_TOOLBAR']
111+
) {
106112
return false;
107113
}
108114
$enabled = (bool)Configure::read('debug')

0 commit comments

Comments
 (0)