[TYPO3-mvc] Fluid / Extbase: empty LazyLoading object is fooling if-conditions

Sebastian Kurfürst sebastian at typo3.org
Thu Jan 28 11:19:48 CET 2010


Hi,

> sorry for continuously spamming this list
No problem at all :-)

> And for the case I have to debug/patch - do you think this is more a bug
> of ExtBase (which shouldn't create a LazyLoading object if the db field
> has no value), or should FLUID take care of it?
I think that is a bug of Extbase, as the value should be Null if no
object will be loaded.

If you don't want to debug extbase, I'd suggest that you write a custom
ViewHelper which will check if the value is an empty lazy loading proxy:
<f:if condition="{bla.image -> myext:emptyLazyLoadingProxy()}"> ...</f:if>

but that's of course not as nice as fixing extbase :-)

Thanks for your awesome work on Extbase, I already look forward to
reviewing all the patches :)

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list