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:
Nikita Popov 2015-04-06 21:52:20 +02:00
parent 78e1885b7d
commit 23c7f19e41

View file

@ -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;
}
}