[BUGFIX] Fix fatal when processing folder does not exist 37/27137/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 29 Jan 2014 22:19:35 +0000 (23:19 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 30 Jan 2014 18:16:23 +0000 (19:16 +0100)
When the processing folder does not exist,
it is created on the fly in ResourceStorage.

However the returned object is at a later point
as string, leading to a fatal error in the end.

Solution is to just store the retuned object directly.

Resolves: #55471
Releases: 6.2
Change-Id: I97b4b5c7992db942812ae033fb963908a4abffde
Reviewed-on: https://review.typo3.org/27137
Reviewed-by: Steffen Ritter
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index 3e12b70..fafa005 100644 (file)
@@ -2446,10 +2446,11 @@ class ResourceStorage {
                                $processingFolder = $this->storageRecord['processingfolder'];
                        }
                        if ($this->driver->folderExists($processingFolder) === FALSE) {
-                               $processingFolder = $this->createFolder($processingFolder);
+                               $this->processingFolder = $this->createFolder($processingFolder);
+                       } else {
+                               $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
+                               $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
                        }
-                       $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
-                       $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
                }
                return $this->processingFolder;
        }