From 441af686feea56fb45504a658eeae6209d1d4f4c Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 10 Sep 2019 12:06:33 +0300 Subject: [PATCH] Fix Undefined variable: response notice in case of non-404 error Signed-off-by: skjnldsv --- lib/private/Files/Storage/DAV.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 443792f90c641..033ee97701553 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -253,6 +253,7 @@ protected function propfind(string $path): array|false { // 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 @@ protected function propfind(string $path): array|false { 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) { if ($e->getCode() === \CURLE_COULDNT_CONNECT || $e->getCode() === \CURLE_OPERATION_TIMEDOUT) { $this->logger->warning(