[BUGFIX] Add file existence check before processing it
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / ContentObjectRenderer.php
index 4881acb..9460da3 100644 (file)
@@ -1561,7 +1561,7 @@ class ContentObjectRenderer {
         */
        public function fileResource($fName, $addParams = 'alt="" title=""') {
                $incFile = $GLOBALS['TSFE']->tmpl->getFileName($fName);
-               if ($incFile) {
+               if ($incFile && file_exists($incFile)) {
                        $fileinfo = GeneralUtility::split_fileref($incFile);
                        if (GeneralUtility::inList('jpg,gif,jpeg,png', $fileinfo['fileext'])) {
                                $imgFile = $incFile;