aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-03-22 15:01:16 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-03-22 15:01:16 +0100
commit63f19661d2bc4c111ad21df15ad57174d0fa2403 (patch)
tree531b7954de244898bfba3e9279f055bdc31a5a33 /lib/private/App
parent4121b841de5cdeb204c166f8f23f1621c00a9102 (diff)
downloadnextcloud-server-63f19661d2bc4c111ad21df15ad57174d0fa2403.tar.gz
nextcloud-server-63f19661d2bc4c111ad21df15ad57174d0fa2403.zip
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>
Diffstat (limited to 'lib/private/App')
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index bd5c2ba8213..75d2069d07a 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -181,7 +181,7 @@ abstract class Fetcher {
try {
$responseJson = $this->fetch($ETag, $content, $allowUnstable);
- if (empty($responseJson)) {
+ if (empty($responseJson) || empty($responseJson['data'])) {
return [];
}