summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-05-03 19:55:41 +0100
committerJakub Zelenka <bukka@php.net>2016-05-03 19:55:41 +0100
commit34a9882ad357620ccec2bfadba72fce027acd3d6 (patch)
treed531877fdae8ec4126e8042ca350dcfcdb8b770f /Zend/zend_exceptions.c
parent93b67dd511fdf890931e2b18846886368798ca5a (diff)
parentee551106bc11d6ac2eb277b810c9b8bb90e318bc (diff)
downloadphp-git-34a9882ad357620ccec2bfadba72fce027acd3d6.tar.gz
Merge branch 'master' into json_parser_method
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 6d396e7854..63bcca2640 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -662,14 +662,15 @@ ZEND_METHOD(exception, __toString)
zend_class_entry *base_ce;
zend_string *str;
zend_fcall_info fci;
- zval fname, rv;
+ zval rv;
+ zend_string *fname;
DEFAULT_0_PARAMS;
str = ZSTR_EMPTY_ALLOC();
exception = getThis();
- ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1);
+ fname = zend_string_init("gettraceasstring", sizeof("gettraceasstring")-1, 0);
while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), zend_ce_throwable)) {
zend_string *prev_str = str;
@@ -678,8 +679,7 @@ ZEND_METHOD(exception, __toString)
zend_long line = zval_get_long(GET_PROPERTY(exception, "line"));
fci.size = sizeof(fci);
- fci.function_table = &Z_OBJCE_P(exception)->function_table;
- ZVAL_COPY_VALUE(&fci.function_name, &fname);
+ ZVAL_STR(&fci.function_name, fname);
fci.object = Z_OBJ_P(exception);
fci.retval = &trace;
fci.param_count = 0;
@@ -720,7 +720,7 @@ ZEND_METHOD(exception, __toString)
exception = GET_PROPERTY(exception, "previous");
}
- zval_dtor(&fname);
+ zend_string_release(fname);
exception = getThis();
base_ce = i_get_exception_base(exception);