Skip to content

Commit 35cd1b6

Browse files
authored
Zend/exception.c: improve getTraceAsString() method call setup (#23665)
zend_call_function() doesn't care about the calling scope, moreover if the FCC is set it doesn't care about the function_name and object fields of the FCI as those are only used for callability checks
1 parent 04c41f0 commit 35cd1b6

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎Zend/zend_exceptions.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,11 +746,9 @@ ZEND_METHOD(Exception, __toString)
746746

747747
zend_fcall_info fci;
748748
fci.size = sizeof(fci);
749-
ZVAL_UNDEF(&fci.function_name);
750749
fci.retval = &trace;
751750
fci.param_count = 0;
752751
fci.params = NULL;
753-
fci.object = NULL;
754752
fci.named_params = NULL;
755753

756754
zend_fcall_info_cache fcc;
@@ -765,7 +763,6 @@ ZEND_METHOD(Exception, __toString)
765763
zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE));
766764

767765
fcc.object = Z_OBJ_P(exception);
768-
fcc.calling_scope = Z_OBJCE_P(exception);
769766
zend_call_function(&fci, &fcc);
770767

771768
if (Z_TYPE(trace) != IS_STRING) {

0 commit comments

Comments
 (0)