diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-10-03 17:54:51 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-10-03 17:54:51 +0000 |
| commit | 8e1c9371bbc68d433702b9a7e647c7ad268b050c (patch) | |
| tree | 2c04ed1b9c17e66b74f7475d19649c12cb3e44ab | |
| parent | 8581c7328f1795e7b83ce8b09bfdffed49be6df8 (diff) | |
| download | php-git-8e1c9371bbc68d433702b9a7e647c7ad268b050c.tar.gz | |
MFH: throw a warning when doing modulus by 0 (fr #39027)
| -rw-r--r-- | Zend/zend_operators.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index e7ed2073d5..12a3adfed5 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -918,6 +918,7 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) 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 */ } |
