mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.1' into PHP-7.2
This commit is contained in:
commit
e112b8474a
3 changed files with 26 additions and 1 deletions
2
NEWS
2
NEWS
|
@ -10,6 +10,8 @@ PHP NEWS
|
|||
. Fixed bug #75786 (segfault when using spread operator on generator passed
|
||||
by reference). (Nikita)
|
||||
. Fixed bug #75799 (arg of get_defined_functions is optional). (carusogabriel)
|
||||
. Fixed bug #75396 (Exit inside generator finally results in fatal error).
|
||||
(Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #75687 (var 8 (TMP) has array key type but not value type).
|
||||
|
|
22
Zend/tests/generators/bug75396.phpt
Normal file
22
Zend/tests/generators/bug75396.phpt
Normal file
|
@ -0,0 +1,22 @@
|
|||
--TEST--
|
||||
Bug #75396: Exit inside generator finally results in fatal error
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$gen = (function () {
|
||||
yield 42;
|
||||
|
||||
try {
|
||||
echo "Try\n";
|
||||
exit("Exit\n");
|
||||
} finally {
|
||||
echo "Finally\n";
|
||||
}
|
||||
})();
|
||||
|
||||
$gen->send("x");
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Try
|
||||
Exit
|
|
@ -185,7 +185,8 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
|
|||
generator->node.parent = NULL;
|
||||
}
|
||||
|
||||
if (EXPECTED(!ex) || EXPECTED(!(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK))) {
|
||||
if (EXPECTED(!ex) || EXPECTED(!(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK))
|
||||
|| CG(unclean_shutdown)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue