Project

General

Profile

Actions

Bug #71951

closed

f:debug() fails when lazy loading properties result in NULL

Added by Sebastian Michaelsen almost 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
Start date:
2015-11-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

DebuggerUtility::renderObject() recognizes LazyLoadingProxy s and resolves them. But then it just assumes the value is still an object, but the lazy loading resolution may also result in NULL. This results in the following error:

http://shots.michaelsen.io/Mmlg

The lazy loading resolution in DebuggerUtility::renderObject() should look like this:

        if ($object instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
            $object = $object->_loadRealInstance();
            if (is_null($object)) {
                return gettype($object);
            }
        }
Actions

Also available in: Atom PDF