[BUGFIX] Ensure PackageManager scans every possible directory 56/55356/2
authorNicole Cordes <typo3@cordes.co>
Sat, 13 Jan 2018 21:08:44 +0000 (22:08 +0100)
committerHelmut Hummel <typo3@helhum.io>
Sat, 13 Jan 2018 21:58:54 +0000 (22:58 +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/55356
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/core/Classes/Package/PackageManager.php

index 7035e9a..509a534 100644 (file)
@@ -1041,7 +1041,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/*/';