From 9c04c076228821d892346f5f35bbf74f4720d021 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 16 Aug 2023 14:12:40 +0200 Subject: fix: Prevent PHP warnings when optional CacheEntry attributes are unset Signed-off-by: Ferdinand Thiessen --- lib/private/Files/Cache/CacheEntry.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/private/Files/Cache/CacheEntry.php') diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index 3c93296ff62..ce9df2823c8 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -114,15 +114,15 @@ class CacheEntry implements ICacheEntry { } public function getMetadataEtag(): ?string { - return $this->data['metadata_etag']; + return $this->data['metadata_etag'] ?? null; } public function getCreationTime(): ?int { - return $this->data['creation_time']; + return $this->data['creation_time'] ?? null; } public function getUploadTime(): ?int { - return $this->data['upload_time']; + return $this->data['upload_time'] ?? null; } public function getData() { -- cgit v1.2.3