From d84f1466e0d70e8a2a1e7230a8a9d4db167c0081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 14 Oct 2025 16:56:07 +0200 Subject: [PATCH] fix: Fix crash in files_version about uninitialized property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix "Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization" Signed-off-by: Côme Chilliet --- lib/private/Files/Cache/Wrapper/CacheWrapper.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index 7fd4cd921ae..bf23f1cc30a 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -53,6 +53,15 @@ class CacheWrapper extends Cache { } } + protected function shouldEncrypt(string $targetPath): bool { + $cache = $this->getCache(); + if ($cache instanceof Cache) { + return $cache->shouldEncrypt($targetPath); + } else { + return false; + } + } + /** * Make it easy for wrappers to modify every returned cache entry *