260614d
From 463e2ea15d6fb71b96363d60c7e4bdc2c020eddf Mon Sep 17 00:00:00 2001
260614d
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
260614d
Date: Mon, 4 Jul 2016 13:47:03 +0200
260614d
Subject: [PATCH] Initialize array elements properly
260614d
260614d
---
260614d
 lib/private/App/InfoParser.php | 2 +-
260614d
 1 file changed, 1 insertion(+), 1 deletion(-)
260614d
260614d
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php
260614d
index c158e5c..843ed02 100644
260614d
--- a/lib/private/App/InfoParser.php
260614d
+++ b/lib/private/App/InfoParser.php
260614d
@@ -141,7 +141,7 @@ function xmlToArray($xml) {
260614d
 			$totalElement = count($xml->{$element});
260614d
 
260614d
 			if (!isset($array[$element])) {
260614d
-				$array[$element] = "";
260614d
+				$array[$element] = $totalElement > 1 ? [] : "";
260614d
 			}
260614d
 			/** @var \SimpleXMLElement $node */
260614d
 			// Has attributes