From: Thomas Müller Date: Tue, 2 Dec 2014 14:06:51 +0000 (+0100) Subject: fix an issue where the types tag holds an empty string X-Git-Tag: v8.0.0alpha1~179^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb81c52b9517321fb6e8da4c80f04f43ed96e3f7;p=nextcloud-server.git fix an issue where the types tag holds an empty string --- 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(); } }