From d64fe1e725c49953de5403752ff5cf6e5dd30945 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Nov 2024 17:23:08 +0100 Subject: 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(-) (limited to 'lib/private/Files/Storage/Wrapper/Encoding.php') diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index d5afbad9592..ac0574389c6 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) { + $entry['name'] = trim(Filesystem::normalizePath($entry['name']), '/'); + } return $entry; } -- cgit v1.2.3