[TYPO3-mvc] Bug or feature: implementation of Iterator and ArrayAccess of Tx_Extbase_Persistence_ObjectStorage does't not work as expected

Christian Zenker christian.zenker at 599media.de
Fri Feb 18 10:45:44 CET 2011


On Fri, 18 Feb 2011 10:23:04 +0100, Marc Bastian Heinrichs  
<typo3 at mbh-web.de> wrote:

> Is this a bug or feature?

It's more of a PHP bug/feature. Using current(), next(), etc. in  
conjunction with unset() causes the issues you described. I guess the  
objectStorage uses these methods internally.

But the solution is usually not that simple if the objects are stored  
internally in an associative array (which I guess they are, if I remind  
correctly) as you are dependend on current() and next() in that case. So  
you have to fiddle around a little.

I can dig into this later that day.

Christian.


More information about the TYPO3-project-typo3v4mvc mailing list