From bd8d890b194c8e0d110258bde2ef30c03adf3cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 31 Jan 2019 14:54:34 +0100 Subject: [PATCH] Fix useless requirement of ConsoleNoLogin config Even when the Console Panel is not enable by settings (i.e. the entry is not present), the `ConsoleNoLogin` config is required. It make no sense to force definition of this config if the panel is not going to be used. ``` PHP Notice: Undefined index: ConsoleNoLogin in /var/www/glpi/vendor/runcmf/runtracy/src/RunTracy/Middlewares/TracyMiddleware.php at line 129 ``` --- src/RunTracy/Middlewares/TracyMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RunTracy/Middlewares/TracyMiddleware.php b/src/RunTracy/Middlewares/TracyMiddleware.php index d508d49..ea677f4 100644 --- a/src/RunTracy/Middlewares/TracyMiddleware.php +++ b/src/RunTracy/Middlewares/TracyMiddleware.php @@ -126,7 +126,7 @@ public function __invoke(Request $request, Response $response, callable $next) Debugger::getBar()->addPanel(new \RunTracy\Helpers\IncludedFiles()); } // check if enabled or blink if active critical value - if (isset($cfg['showConsolePanel']) || $this->defcfg['configs']['ConsoleNoLogin']) { + if (isset($cfg['showConsolePanel']) || (isset($cfg['configs']['ConsoleNoLogin']) && $this->defcfg['configs']['ConsoleNoLogin'])) { Debugger::getBar()->addPanel(new \RunTracy\Helpers\ConsolePanel( $this->defcfg['configs'] ));