Skip to content

Commit

Permalink
Merge pull request #61 from remicollet/issue-php81
Browse files Browse the repository at this point in the history
fix for 8.1.0alpha2
  • Loading branch information
longxinH authored Jul 8, 2021
2 parents 1877255 + 3eadeb3 commit 5a558a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,12 @@ ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int
zend_string *function_name;
zend_op_array *op_array;

#if PHP_VERSION_ID < 80100
filename = hp_get_base_filename(file_handle->filename);
#else
filename = hp_get_base_filename(ZSTR_VAL(file_handle->filename));
#endif

function_name = strpprintf(0, "load::%s", filename);

is_profiling = begin_profiling(function_name, NULL);
Expand Down Expand Up @@ -1481,4 +1486,4 @@ void hp_init_trace_callbacks()

callback = hp_trace_callback_curl_exec;
register_trace_callback("curl_exec", callback);
}
}

0 comments on commit 5a558a4

Please sign in to comment.