[TYPO3-mvc] RFC: #10683 PHP Warning from Tx_Extbase_Persistence_LazyLoadingProxy::__call() when lazy 1:1 relation is hidden

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Nov 9 01:33:06 CET 2010


Hey,

> Problem:
> If you have an lazy property which is an 1:1 relation to another object
> and the related object is hidden,
> the call $objects = $dataMapper->fetchRelated() in
> Tx_Extbase_Persistence_LazyLoadingProxy::_loadRealInstance() could
> not load the related object (what is IMO correct in FE). So
> _loadRealInstance() would return NULL, what would cause the warning.
>
>
> Solution:
> Check if is_object before calling call_user_func_array

I noticed that you return FALSE if the object is not available - default 
behavior should be NULL I think (just as without lazy loading). After 
that you get my +1 :)

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list