diff --git a/plugins/system/debug/debug.php b/plugins/system/debug/debug.php index fdfae081654bd..4eeea482e4c57 100644 --- a/plugins/system/debug/debug.php +++ b/plugins/system/debug/debug.php @@ -637,6 +637,8 @@ protected function displayProfileInformation() $totalTime = 0; $totalMem = 0; $marks = array(); + $bars = array(); + $barsMem = array(); foreach (JProfiler::getInstance('Application')->getMarks() as $mark) { @@ -662,8 +664,8 @@ protected function displayProfileInformation() ); } - $avgTime = $totalTime / count($marks); - $avgMem = $totalMem / count($marks); + $avgTime = $totalTime / max(count($marks), 1); + $avgMem = $totalMem / max(count($marks), 1); foreach ($marks as $mark) {