]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix an issue where the types tag holds an empty string
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 2 Dec 2014 14:06:51 +0000 (15:06 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 4 Dec 2014 10:40:33 +0000 (11:40 +0100)
lib/private/app/infoparser.php

index 3d2b42765aae36de609dc4da8be5dbc8d0f5f403..0bfbf6bd13977868f1d2262d032dc1868274cf91 100644 (file)
@@ -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();
                        }
                }