summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/FilesPlugin.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-07-19 15:37:03 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-01 08:20:13 +0200
commite1f52fc9019856d52466d9b796ce738e31f1c4ca (patch)
tree489387720f34360dc58e9f29fb800e1e2af26145 /apps/dav/lib/Connector/Sabre/FilesPlugin.php
parent456392e627de3aad19c8188974a4972cf4e274db (diff)
downloadnextcloud-server-e1f52fc9019856d52466d9b796ce738e31f1c4ca.tar.gz
nextcloud-server-e1f52fc9019856d52466d9b796ce738e31f1c4ca.zip
Stricter phan config fixes
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/FilesPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php8
1 files changed, 3 insertions, 5 deletions
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');
}
}