diff --git a/lib/private/app/infoparser.php b/lib/private/app/infoparser.php index 3d2b42765aae36de609dc4da8be5dbc8d0f5f403..0bfbf6bd13977868f1d2262d032dc1868274cf91 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(); } }