From 81d3a76d5d09eb5e7977879e6cfa8cea967c0bbf Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 8 Nov 2022 17:13:45 +0100 Subject: Fix psalm issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/dav') diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index 0e5ffe51728..dccd10d6021 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -150,9 +150,15 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin { // get target node for proper path conversion if ($this->server->tree->nodeExists($destinationPath)) { $destinationNode = $this->server->tree->getNodeForPath($destinationPath); + if (!$destinationNode instanceof Node) { + return false; + } $path = $destinationNode->getPath(); } else { $parentNode = $this->server->tree->getNodeForPath(dirname($destinationPath)); + if (!$parentNode instanceof Node) { + return false; + } $path = $parentNode->getPath(); } -- cgit v1.2.3