]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix Undefined variable: response notice in case of non-404 error backport/49146/stable30 49160/head
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Tue, 10 Sep 2019 09:06:33 +0000 (12:06 +0300)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 8 Nov 2024 16:14:47 +0000 (16:14 +0000)
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
lib/private/Files/Storage/DAV.php

index 63ef1399a694b9639fbaa7c80d5b96802915481e..e2df66cb054bdedf5bc67c12f8c10364c4e405bf 100644 (file)
@@ -253,6 +253,7 @@ class DAV extends Common {
                // we either don't know it, or we know it exists but need more details
                if (is_null($cachedResponse) || $cachedResponse === true) {
                        $this->init();
+                       $response = false;
                        try {
                                $response = $this->client->propFind(
                                        $this->encodePath($path),
@@ -263,9 +264,9 @@ class DAV extends Common {
                                if ($e->getHttpStatus() === 404 || $e->getHttpStatus() === 405) {
                                        $this->statCache->clear($path . '/');
                                        $this->statCache->set($path, false);
-                                       return false;
+                               } else {
+                                       $this->convertException($e, $path);
                                }
-                               $this->convertException($e, $path);
                        } catch (\Exception $e) {
                                $this->convertException($e, $path);
                        }