Skip to content

Commit 2c91b73

Browse files
committed
Also use zval_get_double for op1 in pow comp time check
Mostly for consistency, but this will also allow evaluating more expressions at compile time.
1 parent 69e2ef6 commit 2c91b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8992,7 +8992,7 @@ ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, co
89928992
/* Division by zero throws an error. */
89938993
return 1;
89948994
}
8995-
if ((opcode == ZEND_POW) && zval_get_long(op1) == 0 && zval_get_double(op2) < 0) {
8995+
if ((opcode == ZEND_POW) && zval_get_double(op1) == 0 && zval_get_double(op2) < 0) {
89968996
/* 0 ** (<0) throws a division by zero error. */
89978997
return 1;
89988998
}

0 commit comments

Comments
 (0)