r46184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46183‎ | r46184 | r46185 >
Date:05:25, 25 January 2009
Author:werdna
Status:deferred
Tags:
Comment:
Fix weird method of checking if any MulRel operations worked.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -219,15 +219,15 @@
220220 $a = $a->toInt();
221221 $b = $b->toInt();
222222 }
223 -
 223+
 224+ $data = null;
224225 if( $op == '*' )
225226 $data = $a * $b;
226 - if( $op == '/' )
 227+ elseif( $op == '/' )
227228 $data = $a / $b;
228 - if( $op == '%' )
 229+ elseif( $op == '%' )
229230 $data = $a % $b;
230 -
231 - if (!$data)
 231+ else
232232 throw new AFPException( "Invalid multiplication-related operation: {$op}" );
233233
234234 if ($type == self::DInt)

Status & tagging log