mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
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.
This commit is contained in:
parent
69e2ef694e
commit
2c91b7364b
@ -8992,7 +8992,7 @@ ZEND_API bool zend_binary_op_produces_error(uint32_t opcode, const zval *op1, co
|
||||
/* Division by zero throws an error. */
|
||||
return 1;
|
||||
}
|
||||
if ((opcode == ZEND_POW) && zval_get_long(op1) == 0 && zval_get_double(op2) < 0) {
|
||||
if ((opcode == ZEND_POW) && zval_get_double(op1) == 0 && zval_get_double(op2) < 0) {
|
||||
/* 0 ** (<0) throws a division by zero error. */
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user