[TYPO3-mvc] Possible bug: LazyObjectStorage->toArray should initialize the objectStorage first?
Franz Koch
typo3.RemoveForMessage at elements-net.de
Sat May 29 00:28:24 CEST 2010
Hey there,
I'm currently porting my extbase based extension dated back to march to
the current SVN version and noticed a changed behavior.
I'm using a LazyObjectStorage as property of a model and had it
converted to a plain array via $myLazyObjectStorage->toArray();. I do
this, because I like to merge the results of various parent objects
($collection =
array_merge($collection,$myObject->getMyLazyProperty()->toArray()).
This used worked just fine before, but now it's returning an empty
array, because the LazyObjectStorage is not initialized before. So
question is, should this method take care of the initialization, or are
we supposed to initialize the LazyObjectStorage via some other API calls
(like ->valid() or ->rewind()) first (which feels a bit odd)? What do
you guys thing about it?
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list