Closed (duplicate)
Project:
Drupal core
Version:
8.4.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Jun 2017 at 21:47 UTC
Updated:
30 Jun 2017 at 17:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
drewklein commentedComment #3
drewklein commentedComment #4
drewklein commentedComment #5
drewklein commentedComment #6
dawehnerThank you for trying to proactive with future changes of PHP!
It would be nice if you could try to minimize the amount of changes. As far as I know break; also works for foreach. You could reduce the diff here a bit, by really just replacing while with a foreach, see https://3v4l.org/b7EkO. list() is totally usable in a foreach loop as well.
What about using array_keys() here?
Comment #7
Anonymous (not verified) commentedComment #8
dawehneryeah let's mark this one as duplicate of the other.
Comment #9
tstoecklerComment #10
drewklein commentedThat's fine about marking as a duplicate. But your comment about DiffEngine isn't correct. The way the code exists with each() the first loop iterates for a while using each() then stops. Then the second loop iterates for a while where the first one stopped. See https://3v4l.org/DZBS0