1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-08 15:16:58 +02:00

DibiNettePanel: works with disabled bar [Closes #43]

This commit is contained in:
David Grudl
2012-01-12 01:04:35 +01:00
parent 2a5934c385
commit 4c85d1d55c

View File

@@ -53,12 +53,12 @@ class DibiNettePanel extends DibiObject implements IBarPanel
class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility
} }
if (is_callable('NDebugger::enable')) { if (is_callable('NDebugger::enable')) {
NDebugger::$bar->addPanel($this); NDebugger::$bar && NDebugger::$bar->addPanel($this);
NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__); NDebugger::$blueScreen && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent'); $connection->onEvent[] = array($this, 'logEvent');
} elseif (is_callable('Debugger::enable')) { } elseif (is_callable('Debugger::enable')) {
Debugger::$bar->addPanel($this); Debugger::$bar && Debugger::$bar->addPanel($this);
Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__); Debugger::$blueScreen && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent'); $connection->onEvent[] = array($this, 'logEvent');
} }
} }