aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/Service.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/xml/lib/Service.php')
-rw-r--r--vendor/sabre/xml/lib/Service.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php
index b2603a4c7..09ee341cf 100644
--- a/vendor/sabre/xml/lib/Service.php
+++ b/vendor/sabre/xml/lib/Service.php
@@ -151,8 +151,14 @@ class Service {
$r->contextUri = $contextUri;
$r->xml($input);
+ $rootElementName = (array)$rootElementName;
+
+ foreach ($rootElementName as &$rEl) {
+ if ($rEl[0] !== '{') $rEl = '{}' . $rEl;
+ }
+
$result = $r->parse();
- if (!in_array($result['name'], (array)$rootElementName, true)) {
+ if (!in_array($result['name'], $rootElementName, true)) {
throw new ParseException('Expected ' . implode(' or ', (array)$rootElementName) . ' but received ' . $result['name'] . ' as the root element');
}
return $result['value'];