[BUGFIX] ext:install Better error handling in first folder step
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / FolderStructure / DirectoryNode.php
index fd1dbc0..b405721 100644 (file)
@@ -130,10 +130,18 @@ class DirectoryNode extends AbstractNode implements NodeInterface {
                if (!$this->isDirectory()) {
                        $status = new Status\ErrorStatus();
                        $status->setTitle('Path ' . $this->getRelativePathBelowSiteRoot() . ' is not a directory');
-                       $status->setMessage(
-                               'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
-                               ' but is of type ' . filetype($this->getAbsolutePath()) . '. I can not fix this. Please investigate.'
-                       );
+                       $fileType = @filetype($this->getAbsolutePath());
+                       if ($fileType) {
+                               $status->setMessage(
+                                       'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
+                                       ' but is of type ' . $fileType . '. I can not fix this. Please investigate.'
+                               );
+                       } else {
+                               $status->setMessage(
+                                       'The target ' . $this->getRelativePathBelowSiteRoot() . ' should be a directory,' .
+                                       ' but is of unknown type, probably because some upper level directory does not exist. Please investigate.'
+                               );
+                       }
                        $result[] = $status;
                } elseif (!$this->isPermissionCorrect()) {
                        $result[] = $this->fixPermission();