summaryrefslogtreecommitdiffstats
path: root/xhprof-php81.patch
blob: 9a419b5108b3ad9252b1e942c0e5054e09c16096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 3eadeb31b8816d930de37a6fe3556451e96755b9 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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
+}