summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-06-28 18:22:10 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-06-28 18:22:59 +0200
commitfb08798c9f0ea820d567668d0cea4833dc61dd8e (patch)
treef8a0be22eb7e68f2b244d994120d54544b40e1d1 /Zend/zend_compile.c
parent64c371142cbdb82eb0879d247430797d73a8ac2d (diff)
downloadphp-git-fb08798c9f0ea820d567668d0cea4833dc61dd8e.tar.gz
Fix bug #69957 (Different ways of handling div/mod by zero)
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 2e0822fdd4..7194aacdb5 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5625,7 +5625,7 @@ static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode
binary_op_type fn = get_binary_op(opcode);
/* don't evaluate division by zero at compile-time */
- if (opcode == ZEND_DIV) {
+ if (opcode == ZEND_DIV || opcode == ZEND_MOD) {
convert_scalar_to_number(op2);
if (Z_TYPE_P(op2) == IS_LONG) {
if (Z_LVAL_P(op2) == 0) {