summaryrefslogtreecommitdiffstats
path: root/9ab8f1dfd8889f9e8581452c1ecde11cbb702280.patch
blob: e830498ed08f3db3b085870438db95967b76ba21 (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
From 9ab8f1dfd8889f9e8581452c1ecde11cbb702280 Mon Sep 17 00:00:00 2001
From: twosee <twose@qq.com>
Date: Sun, 22 Nov 2020 17:42:41 +0800
Subject: [PATCH] Fix sw_zend_is_callable_at_frame() (#3868)

* Fix sw_zend_is_callable_at_frame()

* Require PHP 8.0.1
---
 ext-src/php_swoole.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ext-src/php_swoole.h b/ext-src/php_swoole.h
index ff32a2cccb..96fc4c9b6b 100644
--- a/ext-src/php_swoole.h
+++ b/ext-src/php_swoole.h
@@ -912,10 +912,11 @@ static sw_inline zend_bool sw_zend_is_callable_at_frame(zval *zcallable, zval *z
 {
     zend_string *name;
     zend_bool ret;
-#if PHP_VERSION_ID < 80000
+#if PHP_VERSION_ID < 80001
     ret = zend_is_callable_ex(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, check_flags, &name, fci_cache, error);
 #else
-    ret = zend_is_callable_at_frame(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, frame, check_flags, &name, fci_cache, error);
+    ret = zend_is_callable_at_frame(zcallable, zobject ? Z_OBJ_P(zobject) : NULL, frame, check_flags, fci_cache, error);
+    name = zend_get_callable_name_ex(zcallable, zobject);
 #endif
     if (callable_name)
     {