Skip to content

Commit

Permalink
Merge pull request joomla#3219 from Hackwar/patch-7
Browse files Browse the repository at this point in the history
Fix divison by 0 issue in debug plugin
  • Loading branch information
infograf768 authored and Bakual committed May 12, 2014
2 parents 6575638 + ae6e144 commit bffa9b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/system/debug/debug.php
Expand Up @@ -748,7 +748,7 @@ protected function displayQueries()

// How heavy should the string length count: 0 - 1.
$ratio = 0.5;
$timeScore = $queryTime / (strlen($query) * $ratio) * 200;
$timeScore = $queryTime / ((strlen($query) + 1) * $ratio) * 200;

// Determine color of bargraph depending on query speed and presence of warnings in EXPLAIN.
if ($timeScore > 10)
Expand Down

0 comments on commit bffa9b2

Please sign in to comment.