cvs: ZendEngine2 / zend_operators.c

From: Date: Tue, 03 Oct 2006 17:54:32 +0000
Subject: cvs: ZendEngine2 / zend_operators.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5295@lists.php.net to get a copy of this message
tony2001 Tue Oct 3 17:54:32 2006 UTC Modified files: /ZendEngine2 zend_operators.c Log: throw a warning when doing modulus by 0 (fr #39027) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.c?r1=1.256&r2=1.257&diff_format=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.256 ZendEngine2/zend_operators.c:1.257 --- ZendEngine2/zend_operators.c:1.256 Wed Sep 27 15:40:09 2006 +++ ZendEngine2/zend_operators.c Tue Oct 3 17:54:32 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.256 2006/09/27 15:40:09 tony2001 Exp $ */ +/* $Id: zend_operators.c,v 1.257 2006/10/03 17:54:32 tony2001 Exp $ */ #include <ctype.h> @@ -1297,6 +1297,7 @@ zendi_convert_to_long(op2, op2_copy, result); if (Z_LVAL_P(op2) == 0) { + zend_error(E_WARNING, "Division by zero"); ZVAL_BOOL(result, 0); return FAILURE; /* modulus by zero */ }

« previous php.zend-engine.cvs (#5295) next »