aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-11-14 17:23:08 +0100
committerRobin Appelman <robin@icewind.nl>2024-11-14 17:23:08 +0100
commitd64fe1e725c49953de5403752ff5cf6e5dd30945 (patch)
tree789108f519c76d120e7973867294dd8d001dce26
parent22e2419b2828c5866a32c9da43cbaa8c8a2898ea (diff)
downloadnextcloud-server-encoding-wrapper-metadata.tar.gz
nextcloud-server-encoding-wrapper-metadata.zip
fix: don't set 'name' on null metadataencoding-wrapper-metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php4
1 files changed, 3 insertions, 1 deletions
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;
}