File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ PHP NEWS
10
10
. Fixed bug #75786 (segfault when using spread operator on generator passed
11
11
by reference). (Nikita)
12
12
. Fixed bug #75799 (arg of get_defined_functions is optional). (carusogabriel)
13
+ . Fixed bug #75396 (Exit inside generator finally results in fatal error).
14
+ (Nikita)
13
15
14
16
- Opcache:
15
17
. Fixed bug #75687 (var 8 (TMP) has array key type but not value type).
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #75396: Exit inside generator finally results in fatal error
3
+ --FILE--
4
+ <?php
5
+
6
+ $ gen = (function () {
7
+ yield 42 ;
8
+
9
+ try {
10
+ echo "Try \n" ;
11
+ exit ("Exit \n" );
12
+ } finally {
13
+ echo "Finally \n" ;
14
+ }
15
+ })();
16
+
17
+ $ gen ->send ("x " );
18
+
19
+ ?>
20
+ --EXPECT--
21
+ Try
22
+ Exit
Original file line number Diff line number Diff line change @@ -185,7 +185,8 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
185
185
generator -> node .parent = NULL ;
186
186
}
187
187
188
- if (EXPECTED (!ex ) || EXPECTED (!(ex -> func -> op_array .fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK ))) {
188
+ if (EXPECTED (!ex ) || EXPECTED (!(ex -> func -> op_array .fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK ))
189
+ || CG (unclean_shutdown )) {
189
190
return ;
190
191
}
191
192
You can’t perform that action at this time.
0 commit comments