diff --git a/src/sp_utils.c b/src/sp_utils.c index 85501684..147cc468 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -166,20 +166,19 @@ int sp_log_request(const zend_string* restrict folder, fprintf(file, "FILE: %s:%d\n", current_filename, current_line); - - zend_execute_data *orig_execute_data = EG(current_execute_data); - zend_execute_data *current = EG(current_execute_data); - while (current) { + zend_execute_data* orig_execute_data = EG(current_execute_data); + zend_execute_data* current = EG(current_execute_data); + while (current) { EG(current_execute_data) = current; char* const complete_path_function = get_complete_function_path(current); - if (complete_path_function) { - const int current_line = zend_get_executed_lineno(TSRMLS_C); - fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, current_line); - } + if (complete_path_function) { + const int current_line = zend_get_executed_lineno(TSRMLS_C); + fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, + current_line); + } current = current->prev_execute_data; - } - EG(current_execute_data) = orig_execute_data; - + } + EG(current_execute_data) = orig_execute_data; for (size_t i = 0; zones[i].str; i++) { zval* variable_value;