File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ PHP NEWS
6
6
. Fixed bug #79599 (coredump in set_error_handler). (Laruence)
7
7
. Fixed bug #79566 (Private SHM is not private on Windows). (cmb)
8
8
. Fixed bug #79489 (.user.ini does not inherit). (cmb)
9
+ . Fixed bug #79600 (Regression in 7.4.6 when yielding an array based
10
+ generator). (Nikita)
9
11
10
12
- FFI:
11
13
. Fixed bug #79571 (FFI: var_dumping unions may segfault). (cmb)
12
14
13
15
- Opcache:
14
16
. Fixed bug #79588 (Boolean opcache settings ignore on/off values). (cmb)
17
+ . Fixed bug #79548 (Preloading segfault with inherited method using static
18
+ variable). (Nikita)
15
19
16
20
- SimpleXML:
17
21
. Fixed bug #79528 (Different object of the same xml between 7.4.5 and
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79600: Regression in 7.4.6 when yielding an array based generator
3
+ --FILE--
4
+ <?php
5
+
6
+ function createArrayGenerator () {
7
+ yield from [
8
+ 1 ,
9
+ 2 ,
10
+ ];
11
+ }
12
+
13
+ function createGeneratorFromArrayGenerator () {
14
+ yield from createArrayGenerator ();
15
+ }
16
+
17
+ foreach (createGeneratorFromArrayGenerator () as $ value ) {
18
+ echo $ value , "\n" ;
19
+ }
20
+
21
+ ?>
22
+ --EXPECT--
23
+ 1
24
+ 2
Original file line number Diff line number Diff line change @@ -792,6 +792,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
792
792
793
793
if (UNEXPECTED (!Z_ISUNDEF (generator -> values ))) {
794
794
if (EXPECTED (zend_generator_get_next_delegated_value (generator ) == SUCCESS )) {
795
+ orig_generator -> flags &= ~ZEND_GENERATOR_DO_INIT ;
795
796
return ;
796
797
}
797
798
/* If there are no more deletegated values, resume the generator
You can’t perform that action at this time.
0 commit comments