Skip to content

Commit

Permalink
make availability wrapper more resilient
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Feb 23, 2022
1 parent 8d18e28 commit c0732ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_external/lib/Config/ConfigAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getMountsForUser(IUser $user, IStorageFactory $loader) {
$availableStorages = array_map(function (Storage\IStorage $storage, StorageConfig $storageConfig) {
try {
$availability = $storage->getAvailability();
if (!$availability['available'] && !Availability::shouldRecheck($availability)) {
if ($availability === null || (!$availability['available'] && !Availability::shouldRecheck($availability))) {
$storage = new FailedStorage([
'exception' => new StorageNotAvailableException('Storage with mount id ' . $storageConfig->getId() . ' is not available')
]);
Expand Down

0 comments on commit c0732ab

Please sign in to comment.