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