[BUGFIX] Get folder’s identifier for exception message 78/51178/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sat, 7 Jan 2017 16:18:49 +0000 (17:18 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 7 Jan 2017 17:05:37 +0000 (18:05 +0100)
The identifier of the folder object is now retrieved and used in the
exception message.

Resolves: #79194
Releases: master, 7.6
Change-Id: Iebea177434c6913bab705df119d750b497238252
Reviewed-on: https://review.typo3.org/51178
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index 7f33867..f9a8202 100644 (file)
@@ -977,7 +977,7 @@ class ResourceStorage implements ResourceStorageInterface
     {
         // Check if targetFolder is within this storage
         if ($this->getUid() !== $targetFolder->getStorage()->getUid()) {
-            throw new \RuntimeException('The target folder is not in the same storage. Target folder given: "' . $targetFolder . '"', 1422553107);
+            throw new \RuntimeException('The target folder is not in the same storage. Target folder given: "' . $targetFolder->getIdentifier() . '"', 1422553107);
         }
         // Check for a valid file extension
         if (!$this->checkFileExtensionPermission($targetFileName)) {