diff options
Diffstat (limited to 'core/Profiler.php')
-rw-r--r-- | core/Profiler.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/Profiler.php b/core/Profiler.php index bcbf67019c..e3a62f7049 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -52,7 +52,8 @@ class Profiler $profiler = Db::get()->getProfiler(); if (!$profiler->getEnabled()) { - throw new \Exception("To display the profiler you should enable enable_sql_profiler on your config/config.ini.php file"); + // To display the profiler you should enable enable_sql_profiler on your config/config.ini.php file + return; } $infoIndexedByQuery = array(); @@ -133,7 +134,9 @@ class Profiler { $totalTime = self::getDbElapsedSecs(); $queryCount = Profiler::getQueryCount(); - Log::debug(sprintf("Total queries = %d (total sql time = %.2fs)", $queryCount, $totalTime)); + if($queryCount > 0) { + Log::debug(sprintf("Total queries = %d (total sql time = %.2fs)", $queryCount, $totalTime)); + } } /** |