]> source.dussan.org Git - nextcloud-server.git/commitdiff
Initialize array elements properly
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 4 Jul 2016 11:47:03 +0000 (13:47 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Wed, 7 Sep 2016 20:09:08 +0000 (22:09 +0200)
lib/private/App/InfoParser.php

index 734f5c2c6af9bc9cc8b7e3400eac0c380241b5ca..e975ad6f0969220979c7191eefddeadc04759d17 100644 (file)
@@ -156,7 +156,7 @@ class InfoParser {
                        $totalElement = count($xml->{$element});
 
                        if (!isset($array[$element])) {
-                               $array[$element] = "";
+                               $array[$element] = $totalElement > 1 ? [] : "";
                        }
                        /** @var \SimpleXMLElement $node */
                        // Has attributes