From b49b1598f27b9ac90ccd7b981a38128c71ef0091 Mon Sep 17 00:00:00 2001
From: Andreas Fernandez <a.fernandez@scripting-base.de>
Date: Sat, 7 Jan 2017 17:18:49 +0100
Subject: [PATCH] =?UTF-8?q?[BUGFIX]=20Get=20folder=E2=80=99s=20identifier?=
 =?UTF-8?q?=20for=20exception=20message?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/core/Classes/Resource/ResourceStorage.php b/typo3/sysext/core/Classes/Resource/ResourceStorage.php
index 7f33867c4feb..f9a820265194 100644
--- a/typo3/sysext/core/Classes/Resource/ResourceStorage.php
+++ b/typo3/sysext/core/Classes/Resource/ResourceStorage.php
@@ -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)) {
-- 
GitLab