[BUGFIX] Catch freshly introduced ResourceDoesNotExistException 65/31765/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 24 Jul 2014 13:55:29 +0000 (15:55 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 24 Jul 2014 15:10:42 +0000 (17:10 +0200)
Change #60506 introduced a new specific exception in case a file
reference can not be resolved. This new exception now needs to be
catched on the right places.

Change-Id: I545f4eb98386918903380cc3d0b34796a0917b3f
Resolves: #60529
Relates: #60506
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/31765
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Resource/FileRepository.php

index 356a57a..780ec8a 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\Resource;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
 use TYPO3\CMS\Core\Resource\Index\FileIndexRepository;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -204,7 +205,7 @@ class FileRepository extends AbstractRepository {
                                        // Just passing the reference uid, the factory is doing workspace
                                        // overlays automatically depending on the current environment
                                        $itemList[] = $this->factory->getFileReferenceObject($referenceUid);
-                               } catch (\InvalidArgumentException $exception) {
+                               } catch (ResourceDoesNotExistException $exception) {
                                        // No handling, just omit the invalid reference uid
                                }
                        }