]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix Undefined variable: response notice in case of non-404 error backport/49146/stable29 49159/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:12:15 +0000 (16:12 +0000)
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
lib/private/Files/Storage/DAV.php

index e5bbbb560da72c28cee7973ddfda5be90cbcc386..4dea220fc23a12331362d169c3b7cb09bf190ad4 100644 (file)
@@ -283,6 +283,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),
@@ -293,9 +294,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);
                        }