0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-03-13 07:53:51 +00:00

Fix OC\Files\Storage\DAV::hasUpdated when cache is not set

Fixes the test OCA\Files_External\Tests\Storage\WebdavTest::testStat on
 PHP>=7.4

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2022-01-25 09:36:22 +01:00
parent 014ba75165
commit 35dcda36a3
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -796,7 +796,7 @@ class DAV extends Common {
if (isset($response['{DAV:}getetag'])) {
$etag = trim($response['{DAV:}getetag'], '"');
}
if (!empty($etag) && $cachedData['etag'] !== $etag) {
if (($cachedData === false) || (!empty($etag) && ($cachedData['etag'] !== $etag))) {
return true;
} elseif (isset($response['{http://open-collaboration-services.org/ns}share-permissions'])) {
$sharePermissions = (int)$response['{http://open-collaboration-services.org/ns}share-permissions'];