summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-07 15:27:57 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-07 16:40:27 +0200
commit8b77c58130f356093adadd0b86f797d3e2af9f68 (patch)
tree70584afa6fb161a2322c03c045fdefcd2cf7e379 /sapi/phpdbg/phpdbg_prompt.c
parent01cbb5967cdc1c8844df81b3b2b97a65b5ecbb9b (diff)
downloadphp-git-8b77c58130f356093adadd0b86f797d3e2af9f68.tar.gz
Accept zend_object* in zend_update_property
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 3d44d10af0..9f8fdd820c 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -720,11 +720,10 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
zend_object *ex = EG(exception);
zend_string *msg, *file;
zend_long line;
- zval zv, rv, tmp;
+ zval rv, tmp;
EG(exception) = NULL;
- ZVAL_OBJ(&zv, ex);
zend_call_known_instance_method_with_0_params(ex->ce->__tostring, ex, &tmp);
file = zval_get_string(zend_read_property(zend_get_exception_base(ex), ex, ZEND_STRL("file"), 1, &rv));
line = zval_get_long(zend_read_property(zend_get_exception_base(ex), ex, ZEND_STRL("line"), 1, &rv));
@@ -733,7 +732,7 @@ static inline void phpdbg_handle_exception(void) /* {{{ */
EG(exception) = NULL;
msg = ZSTR_EMPTY_ALLOC();
} else {
- zend_update_property_string(zend_get_exception_base(ex), &zv, ZEND_STRL("string"), Z_STRVAL(tmp));
+ zend_update_property_string(zend_get_exception_base(ex), ex, ZEND_STRL("string"), Z_STRVAL(tmp));
zval_ptr_dtor(&tmp);
msg = zval_get_string(zend_read_property(zend_get_exception_base(ex), ex, ZEND_STRL("string"), 1, &rv));
}