[BUGFIX] Check if mount page exist before fetching icon 69/49669/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 30 Aug 2016 22:35:13 +0000 (00:35 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 31 Aug 2016 07:47:34 +0000 (09:47 +0200)
To avoid fatal errors it must be checked if the mount pages
really exist before fetching its icon.

Resolves: #77663
Releases: master, 7.6
Change-Id: Icdb6009c6304096078e7b5bdba733f997a75e9f2
Reviewed-on: https://review.typo3.org/49669
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php

index 1059064..616f770 100644 (file)
@@ -393,7 +393,9 @@ abstract class AbstractTreeView
             // Preparing rootRec for the mount
             if ($uid) {
                 $rootRec = $this->getRecord($uid);
-                $firstHtml .= $this->getIcon($rootRec);
+                if (is_array($rootRec)) {
+                    $firstHtml .= $this->getIcon($rootRec);
+                }
             } else {
                 // Artificial record for the tree root, id=0
                 $rootRec = $this->getRootRecord();