mirror of
https://github.com/php/php-src.git
synced 2024-09-25 20:07:26 +00:00
Merge branch 'master' of git.php.net:/php-src
This commit is contained in:
commit
229351cca2
15
Zend/tests/bug70987.phpt
Normal file
15
Zend/tests/bug70987.phpt
Normal file
@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #70987 (static::class within Closure::call() causes segfault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foo {}
|
||||
$bar = function () {
|
||||
return static::class;
|
||||
};
|
||||
|
||||
var_dump($bar->call(new foo));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(3) "foo"
|
@ -150,6 +150,7 @@ ZEND_METHOD(Closure, call)
|
||||
fci.param_count = my_param_count;
|
||||
fci.object = fci_cache.object = newobj;
|
||||
fci_cache.initialized = 1;
|
||||
fci_cache.called_scope = Z_OBJCE_P(newthis);
|
||||
|
||||
if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_GENERATOR) {
|
||||
zval new_closure;
|
||||
|
Loading…
Reference in New Issue
Block a user