Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-25 17:25:13 +0300
committerRobin Appelman <robin@icewind.nl>2022-02-25 17:25:13 +0300
commitb0ce876f41f6593373505a67a2fe5737c21fa6b6 (patch)
tree8fa0897d83e88d64f8d82c346aa53ee7be82b411 /lib/private/Files/Cache
parent72f9fd951d8f969c5553061dbe919fcef1cd7ecb (diff)
return dummy availability if storage is not found in cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/Storage.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php
index 33785607ef7..2de2c2f84d7 100644
--- a/lib/private/Files/Cache/Storage.php
+++ b/lib/private/Files/Cache/Storage.php
@@ -158,7 +158,7 @@ class Storage {
}
/**
- * @return array|null [ available, last_checked ]
+ * @return array [ available, last_checked ]
*/
public function getAvailability() {
if ($row = self::getStorageById($this->storageId)) {
@@ -167,7 +167,10 @@ class Storage {
'last_checked' => $row['last_checked']
];
} else {
- return null;
+ return [
+ 'available' => true,
+ 'last_checked' => time(),
+ ];
}
}