From 8b77c58130f356093adadd0b86f797d3e2af9f68 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 7 Aug 2020 15:27:57 +0200 Subject: Accept zend_object* in zend_update_property --- sapi/phpdbg/phpdbg_prompt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_prompt.c') 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)); } -- cgit v1.2.1