File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ PHP NEWS
2
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
3
?? ??? ????, PHP 7.4.27
4
4
5
+ - Core:
6
+ . Fixed bug #81626 (Error on use static:: in __сallStatic() wrapped to
7
+ Closure::fromCallable()). (Nikita)
8
+
5
9
- FPM:
6
10
. Fixed bug #81513 (Future possibility for heap overflow in FPM zlog).
7
11
(Jakub Zelenka)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #81626: Error on use static:: in __сallStatic() wrapped to Closure::fromCallable()
3
+ --FILE--
4
+ <?php
5
+ class TestClass {
6
+ public static bool $ wasCalled = false ;
7
+ public static function __callStatic (string $ name , array $ args ): string
8
+ {
9
+ static ::$ wasCalled = true ;
10
+ return 'ok ' ;
11
+ }
12
+ }
13
+ $ closure = Closure::fromCallable ([TestClass::class, 'foo ' ]);
14
+ var_dump ($ closure ());
15
+ ?>
16
+ --EXPECT--
17
+ string(2) "ok"
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
270
270
}
271
271
272
272
fcc .object = fci .object = Z_OBJ_P (ZEND_THIS );
273
+ fcc .called_scope = zend_get_called_scope (EG (current_execute_data ));
273
274
274
275
zend_call_function (& fci , & fcc );
275
276
You can’t perform that action at this time.
0 commit comments