[BUGFIX] PackageManager fails on empty and non-extension dirs 01/24701/2
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 13 Oct 2013 14:34:57 +0000 (16:34 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sun, 13 Oct 2013 14:41:36 +0000 (16:41 +0200)
Check if the could-be extension has an ext_emconf.php file.

Resolves: #52754
Releases: 6.2
Change-Id: I39f0da5d108ce38e3f401c64b82e1bb810b4437b
Reviewed-on: https://review.typo3.org/24701
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Package/PackageManager.php

index 3c76897..ed86966 100644 (file)
@@ -313,7 +313,9 @@ class PackageManager extends \TYPO3\Flow\Package\PackageManager implements \TYPO
                                $filename = $fileInfo->getFilename();
                                if ($filename[0] !== '.') {
                                        $currentPath = \TYPO3\Flow\Utility\Files::getUnixStylePath($fileInfo->getPathName()) . '/';
-                                       $collectedExtensionPaths[$currentPath] = $currentPath;
+                                       if (file_exists($currentPath . 'ext_emconf.php')) {
+                                               $collectedExtensionPaths[$currentPath] = $currentPath;
+                                       }
                                }
                        }
                }