mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Undef results for new arithmetic exceptions
For the compound assing case (e.g. $a <<= $b) the result is going to be dtored, so we have to set *some* value.
This commit is contained in:
parent
78e1885b7d
commit
23c7f19e41
1 changed files with 3 additions and 0 deletions
|
@ -1146,6 +1146,7 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {
|
|||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Division by zero");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
@ -1462,6 +1463,7 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op
|
|||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Bit shift by negative number");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -1492,6 +1494,7 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o
|
|||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Bit shift by negative number");
|
||||
}
|
||||
ZVAL_UNDEF(result);
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue