mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
parent
18a0d46a1b
commit
d26965b247
4
NEWS
4
NEWS
@ -2,6 +2,10 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.4.27
|
||||
|
||||
- Core:
|
||||
. Fixed bug #81626 (Error on use static:: in __сallStatic() wrapped to
|
||||
Closure::fromCallable()). (Nikita)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #81513 (Future possibility for heap overflow in FPM zlog).
|
||||
(Jakub Zelenka)
|
||||
|
17
Zend/tests/bug81626.phpt
Normal file
17
Zend/tests/bug81626.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #81626: Error on use static:: in __сallStatic() wrapped to Closure::fromCallable()
|
||||
--FILE--
|
||||
<?php
|
||||
class TestClass {
|
||||
public static bool $wasCalled = false;
|
||||
public static function __callStatic(string $name, array $args): string
|
||||
{
|
||||
static::$wasCalled = true;
|
||||
return 'ok';
|
||||
}
|
||||
}
|
||||
$closure = Closure::fromCallable([TestClass::class, 'foo']);
|
||||
var_dump($closure());
|
||||
?>
|
||||
--EXPECT--
|
||||
string(2) "ok"
|
@ -270,6 +270,7 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
|
||||
}
|
||||
|
||||
fcc.object = fci.object = Z_OBJ_P(ZEND_THIS);
|
||||
fcc.called_scope = zend_get_called_scope(EG(current_execute_data));
|
||||
|
||||
zend_call_function(&fci, &fcc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user