[BUGFIX] Catch exception in element browser 42/24842/3
authorMarkus Hoelzle <typo3@markus-hoelzle.de>
Wed, 16 Oct 2013 13:47:26 +0000 (15:47 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sun, 10 Nov 2013 13:02:22 +0000 (14:02 +0100)
If the last selected folder doesn't exist anymore an exeption in the
element browser was thrown.

Resolves: #52306
Releases: 6.2, 6.1, 6.0
Change-Id: Ia6645fd61b879ecaedd98f7f7fa17bd3dd7c162b
Reviewed-on: https://review.typo3.org/24842
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index f5e2897..334eeb4 100644 (file)
@@ -822,7 +822,10 @@ class ElementBrowser {
                                // Create upload/create folder forms, if a path is given
                                if ($this->expandFolder) {
                                        $selectedFolder = FALSE;
-                                       $fileOrFolderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->expandFolder);
+                                       try {
+                                               $fileOrFolderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->expandFolder);
+                                       } catch (\Exception $e) {
+                                       }
 
                                        if ($fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
                                                // It's a folder