aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-02 15:06:51 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-04 11:40:33 +0100
commiteb81c52b9517321fb6e8da4c80f04f43ed96e3f7 (patch)
tree8af3a7b91bc218adbe013c962d7356125e2f1b26
parent086ec3de15d76806d01437d7f64106146b3553ea (diff)
downloadnextcloud-server-eb81c52b9517321fb6e8da4c80f04f43ed96e3f7.tar.gz
nextcloud-server-eb81c52b9517321fb6e8da4c80f04f43ed96e3f7.zip
fix an issue where the types tag holds an empty string
-rw-r--r--lib/private/app/infoparser.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/app/infoparser.php b/lib/private/app/infoparser.php
index 3d2b42765aa..0bfbf6bd139 100644
--- a/lib/private/app/infoparser.php
+++ b/lib/private/app/infoparser.php
@@ -76,11 +76,15 @@ class InfoParser {
}
}
if (array_key_exists('types', $array)) {
- foreach ($array['types'] as $type => $v) {
- unset($array['types'][$type]);
- if (is_string($type)) {
- $array['types'][] = $type;
+ if (is_array($array['types'])) {
+ foreach ($array['types'] as $type => $v) {
+ unset($array['types'][$type]);
+ if (is_string($type)) {
+ $array['types'][] = $type;
+ }
}
+ } else {
+ $array['types'] = array();
}
}