Skip to content

Commit

Permalink
Fix useless requirement of ConsoleNoLogin config
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
cedric-anne committed Jan 31, 2019
1 parent 99c87de commit bd8d890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RunTracy/Middlewares/TracyMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']
));
Expand Down

0 comments on commit bd8d890

Please sign in to comment.