mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(AppStore\Fetcher): Ensure get returns an array
When fetch fails and the `data` prop contains null (e.g. `json_decode` failed), then we should return an empty array instead of null. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
4121b841de
commit
63f19661d2
1 changed files with 1 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ abstract class Fetcher {
|
|||
try {
|
||||
$responseJson = $this->fetch($ETag, $content, $allowUnstable);
|
||||
|
||||
if (empty($responseJson)) {
|
||||
if (empty($responseJson) || empty($responseJson['data'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue