Skip to content

Commit fc37a82

Browse files
authored
Fix debug backtrace frameno (#8761)
1 parent e619af4 commit fc37a82

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,8 +1737,6 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
17371737
prev = zend_generator_check_placeholder_frame(prev);
17381738
}
17391739

1740-
frameno++;
1741-
17421740
/* We use _zend_hash_append*() and the array must be preallocated */
17431741
stack_frame = zend_new_array(8);
17441742
zend_hash_real_init_mixed(stack_frame);
@@ -1882,6 +1880,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
18821880

18831881
ZVAL_ARR(&tmp, stack_frame);
18841882
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp);
1883+
frameno++;
18851884

18861885
skip_frame:
18871886
if (UNEXPECTED(ZEND_CALL_KIND(call) == ZEND_CALL_TOP_FUNCTION)

0 commit comments

Comments
 (0)