diff --git a/lib/Service/ExAppService.php b/lib/Service/ExAppService.php index 5845c7e6..3eb840f1 100644 --- a/lib/Service/ExAppService.php +++ b/lib/Service/ExAppService.php @@ -274,7 +274,11 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo): } $appInfo = json_decode(json_encode((array)$xmlAppInfo), true); if (isset($appInfo['external-app']['scopes']['value'])) { - $appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['value']; + if (is_array($appInfo['external-app']['scopes']['value'])) { + $appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['value']; + } else { + $appInfo['external-app']['scopes'] = [$appInfo['external-app']['scopes']['value']]; + } } if ($extractedDir) { if (file_exists($extractedDir . '/l10n')) { @@ -283,10 +287,6 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo): $this->logger->info(sprintf('Application %s does not support translations', $appId)); } } - # TO-DO: remove this in AppAPI 2.3.0 - if (isset($appInfo['external-app']['scopes']['required']['value'])) { - $appInfo['external-app']['scopes'] = $appInfo['external-app']['scopes']['required']['value']; - } } return $appInfo; }