Skip to content

Commit 63f1966

Browse files
committed
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>
1 parent 4121b84 commit 63f1966

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function get($allowUnstable = false) {
181181
try {
182182
$responseJson = $this->fetch($ETag, $content, $allowUnstable);
183183

184-
if (empty($responseJson)) {
184+
if (empty($responseJson) || empty($responseJson['data'])) {
185185
return [];
186186
}
187187

0 commit comments

Comments
 (0)