Skip to content

Commit fd80132

Browse files
solracsfbackportbot[bot]
authored andcommitted
fix(AppManager): Argument must be of type array|object
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
1 parent 1e60cdc commit fd80132

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

884884
public function isBackendRequired(string $backend): bool {
885885
foreach ($this->appInfos as $appInfo) {
886-
foreach ($appInfo['dependencies']['backend'] as $appBackend) {
887-
if ($backend === $appBackend) {
888-
return true;
889-
}
886+
if (
887+
isset($appInfo['dependencies']['backend'])
888+
&& is_array($appInfo['dependencies']['backend'])
889+
&& in_array($backend, $appInfo['dependencies']['backend'], true)
890+
) {
891+
return true;
890892
}
891893
}
892894

0 commit comments

Comments
 (0)