[BUGFIX] Do not throw warning in FormEngineUtility::getIconHtml 79/45979/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Fri, 15 Jan 2016 21:32:19 +0000 (22:32 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 15 Jan 2016 21:46:50 +0000 (22:46 +0100)
Feeding getIconHtml with non existing file path
is not throwing a warning now.

Releases: 7.6, master
Resolves: #72752
Change-Id: Ic11d6a5551ec964d4f94f2dc3f9542157985f72a
Reviewed-on: https://review.typo3.org/45978
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
(cherry picked from commit 1c1cebe149d6c5d7586350357c3784bf638da31e)
Reviewed-on: https://review.typo3.org/45979

typo3/sysext/backend/Classes/Form/Utility/FormEngineUtility.php

index 4ea3e0b..a707590 100644 (file)
@@ -128,7 +128,7 @@ class FormEngineUtility
 
         if (StringUtility::beginsWith($icon, 'EXT:')) {
             $absoluteFilePath = GeneralUtility::getFileAbsFileName($icon);
-            if (!empty($absoluteFilePath)) {
+            if (!empty($absoluteFilePath) && is_file($absoluteFilePath)) {
                 $iconFile = '../' . PathUtility::stripPathSitePrefix($absoluteFilePath);
                 $iconInfo = (StringUtility::endsWith($absoluteFilePath, '.svg'))
                     ? true