Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hotfix: Changed array_walk to foreach in Zend\Stdlib\Hydrator\ArraySerializable #4259

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

tux-rampage commented Apr 18, 2013

The data array is manipulated while traversing it. This does not work
with array_walk.

http://www.php.net/manual/en/function.array-walk.php

Only the values of the array may potentially be changed; its structure cannot be altered, i.e., the programmer cannot add, unset or reorder elements. If the callback does not respect this requirement, the behavior of this function is undefined, and unpredictable.

This will fix #4258

Changed array_walk to foreach (Zend\Stdlib\Hydrator\ArraySerializable)
The data array is manipulated while traversing it. This does not work
with array_walk.

See PHP documentation:
http://www.php.net/manual/en/function.array-walk.php
Resolves #4258

weierophinney added a commit that referenced this pull request Apr 22, 2013

Merge pull request #4259 from tux-rampage/hotfix/4258
Hotfix: Changed array_walk to foreach in Zend\Stdlib\Hydrator\ArraySerializable

weierophinney added a commit that referenced this pull request Apr 22, 2013

@ghost ghost assigned weierophinney Apr 22, 2013

weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#4259 from tux-rampage/…
…hotfix/4258

Hotfix: Changed array_walk to foreach in Zend\Stdlib\Hydrator\ArraySerializable

weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment