[BUGFIX] Avoid fatal error if adding composer package 02/27402/2
authorHelge Funk <helge.funk@e-net.info>
Fri, 7 Feb 2014 09:33:01 +0000 (10:33 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 11 Feb 2014 21:14:08 +0000 (22:14 +0100)
Adding composer packages to „Packages“ folder will cause a fatal error
This fix prevents the extension manager from handling not legacy packages

Resolves: #55754
Releases: 6.2
Change-Id: I3ac491c8566b14578f5d3a604c63dffc1310d042
Reviewed-on: https://review.typo3.org/27402
Reviewed-by: Thomas Maroschik
Reviewed-by: Marcin Sągol
Tested-by: Thomas Maroschik
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php

index 197bc5b..5a4315c 100644 (file)
@@ -81,6 +81,11 @@ class ListUtility implements \TYPO3\CMS\Core\SingletonInterface {
                $this->emitPackagesMayHaveChanged();
                $extensions = array();
                foreach ($this->packageManager->getAvailablePackages() as $package) {
+                       // Only TYPO3 related packages could be handled by the extension manager
+                       // Composer packages from "Packages" folder will be instanciated as \TYPO3\Flow\Package\Package
+                       if (!($package instanceof \TYPO3\CMS\Core\Package\PackageInterface)) {
+                               continue;
+                       }
                        $installationType = $this->getInstallTypeForPackage($package);
                        $extensions[$package->getPackageKey()] = array(
                                'siteRelPath' => str_replace(PATH_site, '', $package->getPackagePath()),