Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.3.3 - 2024-04-xx]

### Fixed

- Corrected error handling for `occ` commands: `register` and `update`. #258

## [2.3.2 - 2024-03-28]

### Added
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ to join us in shaping a more versatile, stable, and secure app landscape.
<screenshot>https://raw.githubusercontent.com/cloud-py-api/app_api/main/screenshots/app_api_4.png</screenshot>
<dependencies>
<php min-version="8.1"/>
<nextcloud min-version="27" max-version="29"/>
<nextcloud min-version="27" max-version="30"/>
</dependencies>
<background-jobs>
<job>OCA\AppAPI\BackgroundJob\ExAppInitStatusCheckJob</job>
Expand Down
6 changes: 6 additions & 0 deletions lib/Service/ExAppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ public function getLatestExAppInfoFromAppstore(string $appId, string &$extracted
$exAppAppstoreData = array_filter($exApps, function (array $exAppItem) use ($appId) {
return $exAppItem['id'] === $appId && count($exAppItem['releases']) > 0;
});
if (empty($exAppAppstoreData)) {
return null;
}
$exAppAppstoreData = end($exAppAppstoreData);
$exAppReleaseInfo = end($exAppAppstoreData['releases']);
if ($exAppReleaseInfo !== false) {
Expand Down Expand Up @@ -263,6 +266,9 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo):
}
} else {
$xmlAppInfo = $this->getLatestExAppInfoFromAppstore($appId, $extractedDir);
if (empty($xmlAppInfo)) {
return ['error' => sprintf('Failed to get app info for `%s` from the Appstore', $appId)];
}
}
$appInfo = json_decode(json_encode((array)$xmlAppInfo), true);
if (isset($appInfo['external-app']['scopes']['value'])) {
Expand Down