[BUGFIX] Prevent registration of icons with empty path 12/43612/3
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 28 Sep 2015 13:20:54 +0000 (15:20 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 28 Sep 2015 15:04:15 +0000 (17:04 +0200)
The automatic registration of TCA record icons misses a check against
an empty source. This patch add this check and prevents registration
of icons without a path.

Resolves: #70159
Releases: master
Change-Id: Ibc507a369578c231afea7da516a6dfa061e00f17
Reviewed-on: http://review.typo3.org/43612
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index cb5f0de..b8c8633 100644 (file)
@@ -2028,7 +2028,9 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                        } elseif (strpos($tcaCtrl['iconfile'], '/') !== FALSE) {
                                                $icon = TYPO3_mainDir . GeneralUtility::resolveBackPath($tcaCtrl['iconfile']);
                                        }
-                                       $resultArray['tcarecords-' . $tableName . '-default'] = $icon;
+                                       if ($icon !== NULL) {
+                                               $resultArray['tcarecords-' . $tableName . '-default'] = $icon;
+                                       }
                                }
                        }
                }