Skip to content

Commit ae0cf2a

Browse files
authored
Merge pull request #54549 from nextcloud/backport/54541/stable31
[stable31] fix(AppManager): Argument must be of type array|object
2 parents cfb65a2 + ee84379 commit ae0cf2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/private/App/AppManager.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,12 @@ public function setDefaultApps(array $defaultApps): void {
916916

917917
public function isBackendRequired(string $backend): bool {
918918
foreach ($this->appInfos as $appInfo) {
919-
foreach ($appInfo['dependencies']['backend'] as $appBackend) {
920-
if ($backend === $appBackend) {
921-
return true;
922-
}
919+
if (
920+
isset($appInfo['dependencies']['backend'])
921+
&& is_array($appInfo['dependencies']['backend'])
922+
&& in_array($backend, $appInfo['dependencies']['backend'], true)
923+
) {
924+
return true;
923925
}
924926
}
925927

0 commit comments

Comments
 (0)