From 9302d22c50276ae5a7d641e5545e9c17ed9b296f Mon Sep 17 00:00:00 2001
From: Nicole Cordes <typo3@cordes.co>
Date: Fri, 22 Apr 2016 13:47:45 +0200
Subject: [PATCH] [BUGFIX] Prevent resetting of Package Manager packages

Due to Package Manager cleanup in https://review.typo3.org/46389/
the packageStatesConfiguration property only includes active packages.

This patch prevents resetting the packages property which should store
all available package objects to the active ones.

Resolves: #75864
Releases: master
Change-Id: I44d4e074a04cc294cacf9ec9a707b2367b57a2bb
Reviewed-on: https://review.typo3.org/47852
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
---
 typo3/sysext/core/Classes/Package/PackageManager.php | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/typo3/sysext/core/Classes/Package/PackageManager.php b/typo3/sysext/core/Classes/Package/PackageManager.php
index 15d3d4dd47f8..421aae888df7 100644
--- a/typo3/sysext/core/Classes/Package/PackageManager.php
+++ b/typo3/sysext/core/Classes/Package/PackageManager.php
@@ -688,13 +688,10 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
         $sortedPackageKeys = $this->dependencyResolver->sortPackageStatesConfigurationByDependency($packagesWithDependencies);
 
         // Reorder the packages according to the loading order
-        $newPackages = array();
         $this->packageStatesConfiguration['packages'] = [];
         foreach ($sortedPackageKeys as $packageKey) {
-            $newPackages[$packageKey] = $this->packages[$packageKey];
             $this->registerActivePackage($this->packages[$packageKey]);
         }
-        $this->packages = $newPackages;
         return $packagesWithDependencies;
     }
 
-- 
GitLab