From b0ce876f41f6593373505a67a2fe5737c21fa6b6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 25 Feb 2022 15:25:13 +0100 Subject: return dummy availability if storage is not found in cache Signed-off-by: Robin Appelman --- lib/private/Files/Cache/Storage.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') 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(), + ]; } } -- cgit v1.2.3