[BUGFIX] PackageManager fails on empty array entries in conflicts 98/24698/2
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 13 Oct 2013 14:19:46 +0000 (16:19 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 14 Oct 2013 14:33:45 +0000 (16:33 +0200)
Use the same solution as depends some lines above, skip those entries.

Resolves: #52753
Releases: 6.2
Change-Id: Icd7b154be90afe11e9e19dac70ee78eb09a6d1dd
Reviewed-on: https://review.typo3.org/24698
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
Reviewed-by: Xavier Perseguers
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Package/Package.php

index c267eb7..29b1b1a 100644 (file)
@@ -125,7 +125,11 @@ class Package extends \TYPO3\Flow\Package\Package implements PackageInterface {
                        if (isset($extensionManagerConfiguration['constraints']['conflicts']) && is_array($extensionManagerConfiguration['constraints']['conflicts'])) {
                                $composerManifest->conflict = new \stdClass();
                                foreach ($extensionManagerConfiguration['constraints']['conflicts'] as $conflictingPackageKey => $conflictingPackageVersion) {
-                                       $composerManifest->conflict->$conflictingPackageKey = $conflictingPackageVersion;
+                                       if (!empty($conflictingPackageKey)) {
+                                               $composerManifest->conflict->$conflictingPackageKey = $conflictingPackageVersion;
+                                       } else {
+                                               // TODO: throw meaningful exception or fail silently?
+                                       }
                                }
                        }
                }