Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ ZEND_API ZEND_COLD void zend_error_zstr_at(
// EG(last_fatal_error_backtrace) is useless when the executor is
// inactive, and setting it at this point would leak.
if (EG(active)) {
zend_fetch_debug_backtrace(&EG(last_fatal_error_backtrace), 0, EG(exception_ignore_args) ? DEBUG_BACKTRACE_IGNORE_ARGS : 0, 0);
zend_fetch_debug_backtrace(&EG(last_fatal_error_backtrace), false, EG(exception_ignore_args) ? DEBUG_BACKTRACE_IGNORE_ARGS : 0, 0);
}
}

Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_builtin_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ ZEND_FUNCTION(debug_print_backtrace)
RETURN_THROWS();
}

zend_fetch_debug_backtrace(&backtrace, 1, options, limit);
zend_fetch_debug_backtrace(&backtrace, true, options, limit);
ZEND_ASSERT(Z_TYPE(backtrace) == IS_ARRAY);

zend_string *str = zend_trace_to_string(Z_ARRVAL(backtrace), /* include_main */ false);
Expand All @@ -1915,7 +1915,7 @@ ZEND_FUNCTION(debug_print_backtrace)

/* }}} */

ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit) /* {{{ */
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, bool skip_last, int options, int limit) /* {{{ */
{
zend_execute_data *call, *last_call = NULL;
zend_object *object;
Expand Down Expand Up @@ -2257,7 +2257,7 @@ ZEND_FUNCTION(debug_backtrace)
RETURN_THROWS();
}

zend_fetch_debug_backtrace(return_value, 1, options, limit);
zend_fetch_debug_backtrace(return_value, true, options, limit);
}
/* }}} */

Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_builtin_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct _zval_struct zval;
zend_result zend_startup_builtin_functions(void);

BEGIN_EXTERN_C()
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit);
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, bool skip_last, int options, int limit);
END_EXTERN_C()

#endif /* ZEND_BUILTIN_FUNCTIONS_H */
4 changes: 2 additions & 2 deletions Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static zend_object *zend_default_exception_new(zend_class_entry *class_type) /*

if (EG(current_execute_data)) {
zend_fetch_debug_backtrace(&trace,
0,
false,
EG(exception_ignore_args) ? DEBUG_BACKTRACE_IGNORE_ARGS : 0, 0);
} else {
ZVAL_EMPTY_ARRAY(&trace);
Expand Down Expand Up @@ -656,7 +656,7 @@ ZEND_API zend_string *zend_trace_current_function_args_string(void) {

/* get a backtrace to snarf function args */
zval backtrace;
zend_fetch_debug_backtrace(&backtrace, /* skip_last */ 0, /* options */ 0, /* limit */ 1);
zend_fetch_debug_backtrace(&backtrace, /* skip_last */ false, /* options */ 0, /* limit */ 1);
/* can fail esp if low memory condition */
if (Z_TYPE(backtrace) == IS_ARRAY) {
zval *first_frame = zend_hash_index_find(Z_ARRVAL(backtrace), 0);
Expand Down
4 changes: 2 additions & 2 deletions ext/reflection/php_reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ ZEND_METHOD(ReflectionGenerator, getTrace)
}

EG(current_execute_data) = root_generator->execute_data;
zend_fetch_debug_backtrace(return_value, 0, options, 0);
zend_fetch_debug_backtrace(return_value, false, options, 0);
EG(current_execute_data) = ex_backup;

root_generator->execute_data->prev_execute_data = root_prev;
Expand Down Expand Up @@ -7884,7 +7884,7 @@ ZEND_METHOD(ReflectionFiber, getTrace)
EG(current_execute_data) = fiber->execute_data;
}

zend_fetch_debug_backtrace(return_value, 0, options, 0);
zend_fetch_debug_backtrace(return_value, false, options, 0);

EG(current_execute_data) = execute_data; // Restore original execute data.
fiber->stack_bottom->prev_execute_data = prev_execute_data; // Restore prev execute data on fiber stack.
Expand Down
2 changes: 1 addition & 1 deletion sapi/phpdbg/phpdbg_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void phpdbg_dump_backtrace(size_t num) /* {{{ */
}

phpdbg_try_access {
zend_fetch_debug_backtrace(&zbacktrace, 0, 0, limit);
zend_fetch_debug_backtrace(&zbacktrace, false, 0, limit);
} phpdbg_catch_access {
phpdbg_error("Couldn't fetch backtrace, invalid data source");
return;
Expand Down