mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(files_external): boolean comparison of array
To check if there are no missing required dependencies we need to check if the required dependencies are **empty** because `!array` is still true. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
6fbe98ce2b
commit
ec3c07dfde
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ trait DependencyTrait {
|
|||
*
|
||||
* @return MissingDependency[] Unsatisfied required dependencies
|
||||
*/
|
||||
public function checkRequiredDependencies() {
|
||||
public function checkRequiredDependencies(): array {
|
||||
return array_filter(
|
||||
$this->checkDependencies(),
|
||||
fn (MissingDependency $dependency) => !$dependency->isOptional()
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class BackendService {
|
|||
* @return Backend[]
|
||||
*/
|
||||
public function getAvailableBackends() {
|
||||
return array_filter($this->getBackends(), fn (Backend $backend) => !$backend->checkRequiredDependencies());
|
||||
return array_filter($this->getBackends(), fn (Backend $backend) => empty($backend->checkRequiredDependencies()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue