Index: trunk/extensions/Translate/SpecialLanguageStats.php |
— | — | @@ -210,8 +210,9 @@ |
211 | 211 | continue; |
212 | 212 | } |
213 | 213 | |
214 | | - $translatedPercentage = $wgLang->formatNum( round( 100 * $translated / $total, 2 ) ); |
215 | | - $fuzzyPercentage = $wgLang->formatNum( round( 100 * $fuzzy / $total, 2 ) ); |
| 214 | + // Division by 0 should not be possible, but does ooccur. Caching issue? |
| 215 | + $translatedPercentage = $total ? $wgLang->formatNum( round( 100 * $translated / $total, 2 ) ) : '<error>'; |
| 216 | + $fuzzyPercentage = $total ? $wgLang->formatNum( round( 100 * $fuzzy / $total, 2 ) ) : '<error>'; |
216 | 217 | |
217 | 218 | if ( !wfEmptyMsg( 'percent', wfMsgNoTrans('percent')) ) { |
218 | 219 | $translatedPercentage = wfMsg( 'percent', $translatedPercentage ); |