Use name of ICollection for exception message

* fixes #21230
This commit is contained in:
Morris Jobke 2015-12-16 14:44:28 +01:00
parent aa6230e389
commit 66c0f4eb59
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ class ObjectTree extends \Sabre\DAV\Tree {
$targetNodeExists = $this->nodeExists($destinationPath);
$sourceNode = $this->getNodeForPath($sourcePath);
if ($sourceNode instanceof \Sabre\DAV\ICollection && $targetNodeExists) {
throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode . ', target exists');
throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode->getName() . ', target exists');
}
list($sourceDir,) = \Sabre\HTTP\URLUtil::splitPath($sourcePath);
list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destinationPath);