Last modified: 2010-05-15 14:36:12 UTC
--- SpecialEditcount.php Tue Dec 27 17:43:41 2005
+++ SpecialEditcount.php.new Tue Dec 27 12:38:48 2005
@@ -241,7 +245,7 @@
$total = wfMsgHtml( 'editcount_total' );
$ftotal = $wgLang->formatNum( $this->total );
- $percent = wfPercent( $this->total / $this->total * 100 , 2 );
+ if ($total > 0 ) $percent = wfPercent( $this->total / $this-
>total * 100 , 2 );
otherwise you get an division / 0 when total equals 0.
Your patch had some logic errors as well, $total contains the string "Total" and
not the count (that's $this->total) and even if you fixed that you'd get
E_NOTICE errors when the count was equal to 0 because $percent, which is used
later, wouldn't have been defined in that case.
Anyway, I fixed the div by 0 error, thanks for the report;)
Marking this as FIXED in CVS HEAD