[BUGFIX] DebuggerUtility: Treat null results of lazy objects correctly 01/45101/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 2 Dec 2015 21:17:47 +0000 (22:17 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 2 Dec 2015 21:20:04 +0000 (22:20 +0100)
Resolves: #71951
Releases: master, 6.2
Change-Id: I590f1915fad84e09a6e45988d1adf17f61598c46
Reviewed-on: https://review.typo3.org/45101
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php

index 0801b47..6060649 100644 (file)
@@ -169,6 +169,9 @@ class DebuggerUtility {
        static protected function renderObject($object, $level, $plainText = FALSE, $ansiColors = FALSE) {
                if ($object instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
                        $object = $object->_loadRealInstance();
+                       if (!$object) {
+                               return gettype($object);
+                       }
                }
                $header = self::renderHeader($object, $level, $plainText, $ansiColors);
                if ($level < self::$maxDepth && !self::isBlacklisted($object) && !(self::isAlreadyRendered($object) && $plainText !== TRUE)) {