aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-10-28 11:32:15 +0100
committerGitHub <noreply@github.com>2024-10-28 11:32:15 +0100
commit86006368bf596a98e1cdf4ec7a13e3446456585c (patch)
tree5a2875aff77c3a96a29708089f28a5608a937b63 /lib
parent5efb175665a71ac32fb6a6d5a141c72d12e8534c (diff)
parent220bd3422f7bcc3e9a757dbb4b753b8954eb36b6 (diff)
downloadnextcloud-server-86006368bf596a98e1cdf4ec7a13e3446456585c.tar.gz
nextcloud-server-86006368bf596a98e1cdf4ec7a13e3446456585c.zip
Merge pull request #48912 from nextcloud/bugfix/exception-appscreenshot-notstring
fix(apps-store): Fix exception on generating preview url for installed app screenshot
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/InfoParser.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php
index d0e67b82f21..6610121f446 100644
--- a/lib/private/App/InfoParser.php
+++ b/lib/private/App/InfoParser.php
@@ -190,6 +190,17 @@ class InfoParser {
$array['dependencies']['backend'] = [$array['dependencies']['backend']];
}
+ // Ensure some fields are always arrays
+ if (isset($array['screenshot']) && !is_array($array['screenshot'])) {
+ $array['screenshot'] = [$array['screenshot']];
+ }
+ if (isset($array['author']) && !is_array($array['author'])) {
+ $array['author'] = [$array['author']];
+ }
+ if (isset($array['category']) && !is_array($array['category'])) {
+ $array['category'] = [$array['category']];
+ }
+
if ($this->cache !== null) {
$this->cache->set($fileCacheKey, json_encode($array));
}