File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function __construct(bool $debugMode = false)
3131 public function getConfigSchema (): Nette \Schema \Schema
3232 {
3333 return Expect::structure ([
34- 'debugger ' => Expect::bool (interface_exists (\ Tracy \IBarPanel::class) ),
34+ 'debugger ' => Expect::bool (),
3535 'users ' => Expect::arrayOf (
3636 Expect::anyOf (
3737 Expect::string (), // user => password
@@ -64,7 +64,10 @@ public function loadConfiguration()
6464 $ user = $ builder ->addDefinition ($ this ->prefix ('user ' ))
6565 ->setFactory (Nette \Security \User::class);
6666
67- if ($ this ->debugMode && $ config ->debugger ) {
67+ if (
68+ $ this ->debugMode &&
69+ ($ config ->debugger ?? $ builder ->getByType (\Tracy \Bar::class))
70+ ) {
6871 $ user ->addSetup ('@Tracy\Bar::addPanel ' , [
6972 new Nette \DI \Definitions \Statement (Nette \Bridges \SecurityTracy \UserPanel::class),
7073 ]);
You can’t perform that action at this time.
0 commit comments