[BUGFIX] Ensure PackageManager scans every possible directory 57/55357/2
authorNicole Cordes <typo3@cordes.co>
Sat, 13 Jan 2018 21:08:44 +0000 (22:08 +0100)
committerNicole Cordes <typo3@cordes.co>
Sat, 13 Jan 2018 21:59:46 +0000 (22:59 +0100)
If a scanAvailablePackages() of the PackageManager is triggered, we
need to make sure all possible packagesBasePaths are taken into account.
As new extensions might have been downloaded, we need to re-check those
possible paths unless all were found.

Resolves: #83560
Releases: master, 8.7
Change-Id: I4a65a2f384163b6a3cc3071711e80d88eaf22971
Reviewed-on: https://review.typo3.org/55357
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Package/PackageManager.php

index b45b6fd..bb4da75 100644 (file)
@@ -1035,7 +1035,7 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function getPackageBasePaths()
     {
-        if (empty($this->packagesBasePaths)) {
+        if (count($this->packagesBasePaths) < 3) {
             // Check if the directory even exists and if it is not empty
             if (is_dir(PATH_typo3conf . 'ext') && count(scandir(PATH_typo3conf . 'ext')) > 2) {
                 $this->packagesBasePaths['local'] = PATH_typo3conf . 'ext/*/';