[BUGFIX] PHP warning in ext:documentation
[Packages/TYPO3.CMS.git] / typo3 / sysext / documentation / Classes / Domain / Repository / DocumentRepository.php
index ae1321e..fb23062 100644 (file)
@@ -112,9 +112,14 @@ class DocumentRepository {
         */
        protected function findSphinxDocuments() {
                $basePath = 'typo3conf/Documentation/';
-               $documents = array();
 
+               $documents = array();
                $documentKeys = \TYPO3\CMS\Core\Utility\GeneralUtility::get_dirs(PATH_site . $basePath);
+               // Early return in case no document keys were found
+               if (!is_array($documentKeys)) {
+                       return $documents;
+               }
+
                foreach ($documentKeys as $documentKey) {
                        $icon = \TYPO3\CMS\Documentation\Utility\GeneralUtility::getIcon($documentKey);