[BUGFIX] EXT:form - catch exceptions within page module and form engine
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Mvc / Configuration / YamlSource.php
index 31afdd3..d342c54 100644 (file)
@@ -70,6 +70,12 @@ class YamlSource
             if ($fileToLoad instanceof File) {
                 $fileIdentifier = $fileToLoad->getIdentifier();
                 $rawYamlContent = $fileToLoad->getContents();
+                if ($rawYamlContent === false) {
+                    throw new NoSuchFileException(
+                        'The file "' . $fileToLoad . '" does not exist.',
+                        1498802253
+                    );
+                }
             } else {
                 $fileIdentifier = $fileToLoad;
                 $fileToLoad = GeneralUtility::getFileAbsFileName($fileToLoad);