@@ -1885,7 +1885,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
18851885 zend_execute_data * call , * last_call = NULL ;
18861886 zend_object * object ;
18871887 bool fake_frame = false;
1888- int lineno , frameno = 0 ;
1888+ int frameno = 0 ;
18891889 zend_function * func ;
18901890 zend_string * filename ;
18911891 zend_string * include_filename = NULL ;
@@ -1906,12 +1906,12 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
19061906 EG (filename_override ) = NULL ;
19071907 EG (lineno_override ) = -1 ;
19081908
1909- zend_string * filename = zend_get_executed_filename_ex ();
1910- zend_long lineno = zend_get_executed_lineno ();
1911- if (filename && (!zend_string_equals (filename , filename_override ) || lineno != lineno_override )) {
1909+ zend_string * executed_filename = zend_get_executed_filename_ex ();
1910+ uint32_t lineno = zend_get_executed_lineno ();
1911+ if (executed_filename && (!zend_string_equals (executed_filename , filename_override ) || lineno != lineno_override )) {
19121912 stack_frame = zend_new_array (8 );
19131913 zend_hash_real_init_mixed (stack_frame );
1914- ZVAL_STR_COPY (& tmp , filename );
1914+ ZVAL_STR_COPY (& tmp , executed_filename );
19151915 _zend_hash_append_ex (stack_frame , ZSTR_KNOWN (ZEND_STR_FILE ), & tmp , 1 );
19161916 ZVAL_LONG (& tmp , lineno );
19171917 _zend_hash_append_ex (stack_frame , ZSTR_KNOWN (ZEND_STR_LINE ), & tmp , 1 );
@@ -1974,19 +1974,21 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
19741974 zval * arg = zend_get_zval_ptr (op_data , op_data -> op1_type , & op_data -> op1 , call );
19751975 if (Z_TYPE_P (arg ) == IS_UNDEF ) goto not_frameless_call ;
19761976 }
1977- zend_function * func = ZEND_FLF_FUNC (opline );
1977+ zend_function * frameless_func = ZEND_FLF_FUNC (opline );
19781978 /* Assume frameless functions are not recursive with themselves.
19791979 * This condition may be true when observers are enabled:
19801980 * Observers will put a call frame on top of the frameless opcode. */
1981- if (last_call && last_call -> func == func ) {
1981+ if (last_call && last_call -> func == frameless_func ) {
19821982 goto not_frameless_call ;
19831983 }
19841984 stack_frame = zend_new_array (8 );
19851985 zend_hash_real_init_mixed (stack_frame );
1986- ZVAL_STR_COPY (& tmp , func -> common .function_name );
1986+ ZVAL_STR_COPY (& tmp , frameless_func -> common .function_name );
19871987 _zend_hash_append_ex (stack_frame , ZSTR_KNOWN (ZEND_STR_FUNCTION ), & tmp , 1 );
19881988 /* Steal file and line from the previous frame. */
19891989 if (call -> func && ZEND_USER_CODE (call -> func -> common .type )) {
1990+ uint32_t lineno ;
1991+
19901992 filename = call -> func -> op_array .filename ;
19911993 if (call -> opline -> opcode == ZEND_HANDLE_EXCEPTION ) {
19921994 if (EG (opline_before_exception )) {
@@ -2038,6 +2040,8 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
20382040 zend_hash_real_init_mixed (stack_frame );
20392041
20402042 if (prev && prev -> func && ZEND_USER_CODE (prev -> func -> common .type )) {
2043+ uint32_t lineno ;
2044+
20412045 filename = prev -> func -> op_array .filename ;
20422046 if (prev -> opline -> opcode == ZEND_HANDLE_EXCEPTION ) {
20432047 if (EG (opline_before_exception )) {
0 commit comments