diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-08 17:13:45 +0100 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-11-17 13:22:50 +0000 |
commit | 81d3a76d5d09eb5e7977879e6cfa8cea967c0bbf (patch) | |
tree | bcf19540083c4259e559660810ae38db2f0cc920 /apps/dav/lib | |
parent | 5ed840ed2361a148c60e9900cc6524827e987b17 (diff) | |
download | nextcloud-server-81d3a76d5d09eb5e7977879e6cfa8cea967c0bbf.tar.gz nextcloud-server-81d3a76d5d09eb5e7977879e6cfa8cea967c0bbf.zip |
Fix psalm issues
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 6 |
1 files changed, 6 insertions, 0 deletions
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(); } |