From e1f52fc9019856d52466d9b796ce738e31f1c4ca Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 19 Jul 2017 15:37:03 +0200 Subject: Stricter phan config fixes Signed-off-by: Lukas Reschke --- apps/dav/lib/Connector/Sabre/FilesPlugin.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/dav') diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index efc9a42e5f5..c039928eadd 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -201,13 +201,11 @@ class FilesPlugin extends ServerPlugin { if ($sourceDir !== $destinationDir) { $sourceNodeFileInfo = $sourceNode->getFileInfo(); - if (is_null($sourceNodeFileInfo)) { - throw new NotFound($source . ' does not exist'); - } - - if (!$sourceNodeFileInfo->isDeletable()) { + if ($sourceNodeFileInfo !== null && !$sourceNodeFileInfo->isDeletable()) { throw new Forbidden($source . " cannot be deleted"); } + + throw new NotFound($source . ' does not exist'); } } -- cgit v1.2.3