]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fixed: Correct a divided by 0 bug in full list url report when no hit on pages were...
authoreldy <>
Tue, 29 Oct 2002 19:12:02 +0000 (19:12 +0000)
committereldy <>
Tue, 29 Oct 2002 19:12:02 +0000 (19:12 +0000)
wwwroot/cgi-bin/awstats.pl

index b8b45cb87941701aa18f9bef46858b9d73aa58fc..5d9f1f0d7416603e78251fb2af3cb65a780ce65b 100644 (file)
@@ -6541,13 +6541,13 @@ EOF
                }
                if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalEntries / $total_e - $TotalExits / $total_x - $TotalBytesPages / $total_k",2); }
                $rest_p=$TotalPages-$total_p;
+               $rest_k=$TotalBytesPages-$total_k;
                $rest_e=$TotalEntries-$total_e;
                $rest_x=$TotalExits-$total_x;
-               $rest_k=$TotalBytesPages-$total_k;
                if ($rest_p > 0 || $rest_e > 0 || $rest_k > 0) {
                        print "<TR><TD CLASS=AWL><font color=\"#$color_other\">$Message[2]</font></TD>";
                        if ($ShowPagesStats =~ /P/i) { print "<TD>".($rest_p?$rest_p:"&nbsp;")."</TD>"; }
-                       if ($ShowPagesStats =~ /B/i) { print "<TD>".($rest_k?Format_Bytes($rest_k/$rest_p||1):"&nbsp;")."</TD>"; }
+                       if ($ShowPagesStats =~ /B/i) { print "<TD>".($rest_k?Format_Bytes($rest_k/($rest_p||1)):"&nbsp;")."</TD>"; }
                        if ($ShowPagesStats =~ /E/i) { print "<TD>".($rest_e?$rest_e:"&nbsp;")."</TD>"; }
                        if ($ShowPagesStats =~ /X/i) { print "<TD>".($rest_x?$rest_x:"&nbsp;")."</TD>"; }
                        # Call to plugin function ShowPagesAddField