Bug #78434 [NEW]: Generator yields no items after valid() call

From: Date: Wed, 21 Aug 2019 10:02:01 +0000
Subject: Bug #78434 [NEW]: Generator yields no items after valid() call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222336@lists.php.net to get a copy of this message
From: enumag at gmail dot com Operating system: irrelevant PHP version: 7.4.0beta2 Package: *General Issues Bug Type: Bug Bug description:Generator yields no items after valid() call Description: ------------ See the example script. The inner $function generator is called twice so two zeros should be yielded from $wrapper. Yet only one is yielded if I call valid() on the Generator before using yield from. Test script: --------------- https://3v4l.org/GfJHG Expected result: ---------------- 00 Actual result: -------------- 0 -- Edit bug report at https://bugs.php.net/bug.php?id=78434&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78434&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78434&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78434&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78434&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78434&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78434&r=support Expected behavior: https://bugs.php.net/fix.php?id=78434&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78434&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78434&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78434&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78434&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78434&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78434&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78434&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78434&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78434&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78434&r=mysqlcfg

« previous php.bugs (#222336) next »