diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-08-16 14:12:40 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-08-16 14:12:51 +0200 |
commit | 9c04c076228821d892346f5f35bbf74f4720d021 (patch) | |
tree | a9a83ddcff05e18d3f32173b786c5d83a4f09510 /lib/private/Files/Cache/CacheEntry.php | |
parent | 5b37d6d9ff6bf6b99ba6dd25caab5a6ef5394598 (diff) | |
download | nextcloud-server-9c04c076228821d892346f5f35bbf74f4720d021.tar.gz nextcloud-server-9c04c076228821d892346f5f35bbf74f4720d021.zip |
fix: Prevent PHP warnings when optional CacheEntry attributes are unset
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/private/Files/Cache/CacheEntry.php')
-rw-r--r-- | lib/private/Files/Cache/CacheEntry.php | 6 |
1 files changed, 3 insertions, 3 deletions
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() { |