[BUGFIX] Fix StorageRepository::findByStorageType 15/27915/3
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Thu, 27 Feb 2014 20:02:46 +0000 (21:02 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 1 Mar 2014 20:22:10 +0000 (21:22 +0100)
Since optimizing the retrieval of Storages the
findByStorageType() doesn't find any (also right ones)
storage, because of a wrong comparison.
This fixes also the localDriverStorageCache in
ResourceFactory, finding a bestMatchingStorageByLocalPath
in ResourceFactory, getting the right storage for a local
path as fileIdentifier and creation of duplicate entries
in sys_file with storage 0.

Resolves: #56400
Releases: 6.2
Change-Id: I75ac357dff498f1a209d4c42896bdeddab3641ad
Reviewed-on: https://review.typo3.org/27915
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Resource/StorageRepository.php

index eed5977..ba35b1e 100644 (file)
@@ -148,7 +148,7 @@ class StorageRepository extends AbstractRepository {
 
                $storageObjects = array();
                foreach (static::$storageRowCache as $storageRow) {
-                       if (!$storageRow['driver'] !== $storageType) {
+                       if ($storageRow['driver'] !== $storageType) {
                                continue;
                        }
                        if ($driverRegistry->driverExists($storageRow['driver'])) {