[BUGFIX] Get folder’s identifier for exception message 82/51182/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:13:22 +0000 (18:13 +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/51182
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index 12e65e5..99253de 100644 (file)
@@ -965,7 +965,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)) {