From ae30269eac0d0535fbdd343d3f00ec93eea16ac1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Nov 2024 17:23:08 +0100 Subject: [PATCH] fix: don't set 'name' on null metadata Signed-off-by: Robin Appelman --- lib/private/Files/Storage/Wrapper/Encoding.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index d5afbad9592..92e20cfb3df 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -280,7 +280,9 @@ class Encoding extends Wrapper { public function getMetaData(string $path): ?array { $entry = $this->storage->getMetaData($this->findPathToUse($path)); - $entry['name'] = trim(Filesystem::normalizePath($entry['name']), '/'); + if ($entry !== null) { + $entry['name'] = trim(Filesystem::normalizePath($entry['name']), '/'); + } return $entry; }