diff options
author | Robin Appelman <robin@icewind.nl> | 2022-02-25 15:25:13 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-02-25 15:25:13 +0100 |
commit | b0ce876f41f6593373505a67a2fe5737c21fa6b6 (patch) | |
tree | 8fa0897d83e88d64f8d82c346aa53ee7be82b411 | |
parent | 72f9fd951d8f969c5553061dbe919fcef1cd7ecb (diff) | |
download | nextcloud-server-b0ce876f41f6593373505a67a2fe5737c21fa6b6.tar.gz nextcloud-server-b0ce876f41f6593373505a67a2fe5737c21fa6b6.zip |
return dummy availability if storage is not found in cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/Files/Cache/Storage.php | 7 |
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(), + ]; } } |