mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix fake closure leaking when called from internal func
This commit is contained in:
commit
a9231e7fb2
2 changed files with 19 additions and 0 deletions
15
Zend/tests/fake_closure_in_internal_func_leaks.phpt
Normal file
15
Zend/tests/fake_closure_in_internal_func_leaks.phpt
Normal file
|
@ -0,0 +1,15 @@
|
|||
--TEST--
|
||||
Fake closure called from internal function leaks
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$c = \is_array(...);
|
||||
var_dump(array_filter([[]], $c));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
|
@ -973,6 +973,10 @@ cleanup_args:
|
|||
zend_interrupt_function(EG(current_execute_data));
|
||||
}
|
||||
}
|
||||
|
||||
if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
|
||||
OBJ_RELEASE(Z_OBJ(call->This));
|
||||
}
|
||||
}
|
||||
EG(fake_scope) = orig_fake_scope;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue