diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-07-02 20:47:44 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-07-02 20:47:44 +0200 |
commit | 94722e12cf4ba9a16f8a9f009d60b2e3f0f80e12 (patch) | |
tree | e45b829d0a7a13a4d1aedf8a4e5d17248629c908 /Zend/zend_operators.c | |
parent | b874f1a73d37f17effe7b85042fef0dc703448f8 (diff) | |
download | php-git-94722e12cf4ba9a16f8a9f009d60b2e3f0f80e12.tar.gz |
Introduce ArithmeticError
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 5ad1a14791..5e7a2911a1 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1167,7 +1167,7 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* { if (EG(current_execute_data) && !CG(in_compilation)) { zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero"); } else { - zend_error_noreturn(E_ERROR, "Division by zero"); + zend_error_noreturn(E_ERROR, "Modulo by zero"); } ZVAL_UNDEF(result); return FAILURE; @@ -1518,7 +1518,7 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op return SUCCESS; } else { if (EG(current_execute_data) && !CG(in_compilation)) { - zend_throw_exception_ex(NULL, 0, "Bit shift by negative number"); + zend_throw_exception_ex(zend_ce_arithmetic_error, 0, "Bit shift by negative number"); } else { zend_error_noreturn(E_ERROR, "Bit shift by negative number"); } @@ -1549,7 +1549,7 @@ ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *o return SUCCESS; } else { if (EG(current_execute_data) && !CG(in_compilation)) { - zend_throw_exception_ex(NULL, 0, "Bit shift by negative number"); + zend_throw_exception_ex(zend_ce_arithmetic_error, 0, "Bit shift by negative number"); } else { zend_error_noreturn(E_ERROR, "Bit shift by negative number"); } |