r46187 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r46186
|
r46187
|
r46188
>
Date:
05:54, 25 January 2009
Author:
werdna
Status:
deferred
Tags:
Comment:
Explicit detection for division by zero.
Modified paths:
/trunk/extensions/AbuseFilter/AbuseFilter.parser.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
—
—
@@ -220,6 +220,10 @@
221
221
$b = $b->toInt();
222
222
}
223
223
224
+ if ($op != '*' && $b == 0) {
225
+ throw new AFPException( "Illegal attempt to divide $a by 0." );
226
+ }
227
+
224
228
$data = null;
225
229
if( $op == '*' )
226
230
$data = $a * $b;
Status & tagging log
23:43, 26 January 2009
Brion VIBBER
(
talk
|
contribs
)
changed the
status
of r46187
[
removed:
new
added:
deferred]