From eb81c52b9517321fb6e8da4c80f04f43ed96e3f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
Date: Tue, 2 Dec 2014 15:06:51 +0100
Subject: [PATCH] fix an issue where the types tag holds an empty string

---
 lib/private/app/infoparser.php | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

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