com php-src: Undef results for new arithmetic exceptions: Zend/zend_operators.c

From: Date: Mon, 06 Apr 2015 19:52:20 +0000
Subject: com php-src: Undef results for new arithmetic exceptions: Zend/zend_operators.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86110@lists.php.net to get a copy of this message
Commit: 23c7f19e410d0c856b77d0b70d9df8a531df02bf Author: Nikita Popov <nikic@php.net> Mon, 6 Apr 2015 21:52:20 +0200 Parents: 78e1885b7d03adb310b9d68195128b953973ff96 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=23c7f19e410d0c856b77d0b70d9df8a531df02bf Log: 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. Changed paths: M Zend/zend_operators.c Diff: diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index c5ef353..3409f9b 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -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; } }

« previous php.cvs (#86110) next »