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

Marc Bastian Heinrichs typo3 at mbh-web.de
Mon Nov 8 19:16:46 CET 2010


Hi list,

This is an SVN patch request.

Type: Bug

Bugtracker reference:
http://forge.typo3.org/issues/10683

Branches:
trunk, 1.2

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

Note:
The warning in detail:
Core: Error handler (FE): PHP Warning: call_user_func_array() expects
parameter 1 to be a valid callback, first array member is not a valid
class name or object in
/var/www/web3/wwwroot/typo3conf/ext/extbase/Classes/Persistence/LazyLoadingProxy.php
line 102

Regards,
Marc Bastian


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 10683_LazyLoadingProxy.patch
URL: <http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/attachments/20101108/e194a814/attachment.asc>


More information about the TYPO3-project-typo3v4mvc mailing list