Last modified: 2012-06-19 16:08:12 UTC
Seen on Wikimedia cluster: 1 Warning: Division by zero in /usr/local/apache/common-local/php-1.20wmf5/extensions/ParserFunctions/Expr.php on line 423 Relevant code: case EXPR_MOD: if ( count( $stack ) < 2 ) { throw new ExprError( 'missing_operand', $this->names[$op] ); } $right = array_pop( $stack ); $left = array_pop( $stack ); if ( $right == 0 ) { throw new ExprError( 'division_by_zero', $this->names[$op] ); } $stack[] = $left % $right; break; So it seems somecode manage to pass the ( $right == 0 ) condition though it is still evaluated as a zero in $left % $right :( Lovely PHP!
*** This bug has been marked as a duplicate of bug 35866 ***