From 3eadeb31b8816d930de37a6fe3556451e96755b9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 5 Jul 2021 07:24:44 +0200 Subject: [PATCH] fix for 8.1.0alpha2 --- extension/xhprof.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/xhprof.c b/extension/xhprof.c index 7bcc9652..89c577e0 100755 --- a/extension/xhprof.c +++ b/extension/xhprof.c @@ -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); @@ -1481,4 +1486,4 @@ void hp_init_trace_callbacks() callback = hp_trace_callback_curl_exec; register_trace_callback("curl_exec", callback); -} \ No newline at end of file +}