aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-08-17 11:31:53 +0200
committerGitHub <noreply@github.com>2023-08-17 11:31:53 +0200
commit1406eecf6c248ca6112f4b0faed5bfbf0673abcd (patch)
treeeac0283ffbe12175922def406c990e7da3f14b8a /lib
parentdaf3b29572921562abcb700052c1de19fdd2fe4e (diff)
parent9c04c076228821d892346f5f35bbf74f4720d021 (diff)
downloadnextcloud-server-1406eecf6c248ca6112f4b0faed5bfbf0673abcd.tar.gz
nextcloud-server-1406eecf6c248ca6112f4b0faed5bfbf0673abcd.zip
Merge pull request #39906 from nextcloud/fix/prevent-warnings-if-attr-unset
Prevent PHP warning when CacheEntry extension keys are not set
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Cache.php2
-rw-r--r--lib/private/Files/Cache/CacheEntry.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index e2630879414..67d01bb6999 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -149,7 +149,7 @@ class Cache implements ICache {
* get the stored metadata of a file or folder
*
* @param string | int $file either the path of a file or folder or the file id for a file or folder
- * @return ICacheEntry|false the cache entry as array of false if the file is not found in the cache
+ * @return ICacheEntry|false the cache entry as array or false if the file is not found in the cache
*/
public function get($file) {
$query = $this->getQueryBuilder();
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() {