diff --git a/dibi/libs/DibiException.php b/dibi/libs/DibiException.php index 5da60dff..98ae10b5 100644 --- a/dibi/libs/DibiException.php +++ b/dibi/libs/DibiException.php @@ -80,7 +80,7 @@ class DibiException extends Exception implements /*Nette\*/IDebugPanel */ public function getPanel() { - return dibi::dump($this->sql, TRUE); + return $this->sql ? dibi::dump($this->sql, TRUE) : NULL; } diff --git a/dibi/libs/DibiProfiler.php b/dibi/libs/DibiProfiler.php index 14a97ec0..86a41c94 100644 --- a/dibi/libs/DibiProfiler.php +++ b/dibi/libs/DibiProfiler.php @@ -45,7 +45,7 @@ class DibiProfiler extends DibiObject implements IDibiProfiler, /*Nette\*/IDebug public function __construct() { - if (class_exists(/*Nette\*/'Debug', FALSE) && is_callable('Debug::addPanel')) { + if (class_exists(/*Nette\*/'Debug', FALSE) && is_callable(/*Nette\*/'Debug::addPanel')) { /*Nette\*/Debug::addPanel($this); } @@ -241,7 +241,7 @@ class DibiProfiler extends DibiObject implements IDibiProfiler, /*Nette\*/IDebug if (!dibi::$numOfQueries) return; $content = " -

SQL queries: " . dibi::$numOfQueries . (dibi::$totalTime === NULL ? '' : ', elapsed time: ' . sprintf('%0.3f', dibi::$totalTime * 1000) . ' ms') . "

+

Queries: " . dibi::$numOfQueries . (dibi::$totalTime === NULL ? '' : ', time: ' . sprintf('%0.3f', dibi::$totalTime * 1000) . ' ms') . "

- +
+
@@ -269,7 +270,7 @@ class DibiProfiler extends DibiObject implements IDibiProfiler, /*Nette\*/IDebug "; } - $content .= '
TimeSQL StatementRowsConnection
'; + $content .= ''; return $content; }