Merge pull request #49160 from nextcloud/backport/49146/stable30

[stable30] fix: undefined variable $response in DAV storage
This commit is contained in:
John Molakvoæ 2024-11-12 10:36:10 +01:00 committed by GitHub
commit 1c28e81d00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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);
}