diff -u b/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php --- b/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -195,8 +195,8 @@ public function decode($raw) { $data = array(); if ($raw) { - $this->decodeXml($data, new \SimpleXMLElement($raw)); - return $data['']; + $this->decodeXml($data, new \SimpleXMLElement($raw), TRUE); + return $data; } return $data; } @@ -208,9 +208,13 @@ * This array contains the decoded data. * @param \SimpleXMLElement $simplexml * This contains the XML. + * @param bool $top + * TRUE for the top element. */ - protected function decodeXml(array &$a, \SimpleXMLElement $simplexml) { - $a = &$a[(string) $simplexml['key']]; + protected function decodeXml(array &$a, \SimpleXMLElement $simplexml, $top = FALSE) { + if (!$top) { + $a = &$a[(string) $simplexml['key']]; + } switch ((string) $simplexml['type']) { case 'boolean': $a = (bool) (string) $simplexml['value']; break; case 'integer': $a = (int) (string) $simplexml['value']; break;