diff options
author | Xinchen Hui <laruence@gmail.com> | 2018-02-28 18:06:37 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2018-02-28 18:06:37 +0800 |
commit | d5c171311d3a19999bf02cb56b4b082ec5eaaef1 (patch) | |
tree | d54356a79c81748c379bf1570e0f63a7131a5419 /Zend/zend_execute.c | |
parent | d4387fca0a3775230c296edc450635bfeb6a55fe (diff) | |
download | php-git-d5c171311d3a19999bf02cb56b4b082ec5eaaef1.tar.gz |
Fixed bug #76025 (Segfault while throwing exception in error_handler).
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r-- | Zend/zend_execute.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a420a82917..968618a6aa 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -213,9 +213,10 @@ static zend_always_inline zval *_get_zval_ptr_var_deref(uint32_t var, const zend static zend_never_inline ZEND_COLD void zval_undefined_cv(uint32_t var, const zend_execute_data *execute_data) { - zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var)); - - zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv)); + if (EXPECTED(EG(exception) == NULL)) { + zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var)); + zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv)); + } } static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type, const zend_execute_data *execute_data) |