Skip to content

Commit 4d65b91

Browse files
authored
Merge pull request nextcloud#54541 from nextcloud/fixAppManagerNullObjs
fix(AppManager): Argument must be of type array|object
2 parents 93b97f4 + b36e4e3 commit 4d65b91

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
@@ -992,10 +992,12 @@ public function setDefaultApps(array $defaultApps): void {
992992

993993
public function isBackendRequired(string $backend): bool {
994994
foreach ($this->appInfos as $appInfo) {
995-
foreach ($appInfo['dependencies']['backend'] as $appBackend) {
996-
if ($backend === $appBackend) {
997-
return true;
998-
}
995+
if (
996+
isset($appInfo['dependencies']['backend'])
997+
&& is_array($appInfo['dependencies']['backend'])
998+
&& in_array($backend, $appInfo['dependencies']['backend'], true)
999+
) {
1000+
return true;
9991001
}
10001002
}
10011003

0 commit comments

Comments
 (0)