aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/Deserializer
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-06-17 11:50:17 +0200
committerMario Vavti <mario@mariovavti.com>2019-06-17 11:50:17 +0200
commitc0b9ab930d716178df5f27dc92d91ef32f1e0f0a (patch)
tree833f99390ba2291b33907e41e6f31e4683f01253 /vendor/sabre/xml/lib/Deserializer
parentf106b1db158ed2e8f620e046c3ca06b8584149e9 (diff)
downloadvolse-hubzilla-c0b9ab930d716178df5f27dc92d91ef32f1e0f0a.tar.gz
volse-hubzilla-c0b9ab930d716178df5f27dc92d91ef32f1e0f0a.tar.bz2
volse-hubzilla-c0b9ab930d716178df5f27dc92d91ef32f1e0f0a.zip
update composer libs
Diffstat (limited to 'vendor/sabre/xml/lib/Deserializer')
-rw-r--r--vendor/sabre/xml/lib/Deserializer/functions.php33
1 files changed, 29 insertions, 4 deletions
diff --git a/vendor/sabre/xml/lib/Deserializer/functions.php b/vendor/sabre/xml/lib/Deserializer/functions.php
index 2e5d877e9..07038d99a 100644
--- a/vendor/sabre/xml/lib/Deserializer/functions.php
+++ b/vendor/sabre/xml/lib/Deserializer/functions.php
@@ -66,9 +66,20 @@ function keyValue(Reader $reader, $namespace = null) {
return [];
}
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
+
$values = [];
- $reader->read();
do {
if ($reader->nodeType === Reader::ELEMENT) {
@@ -79,7 +90,9 @@ function keyValue(Reader $reader, $namespace = null) {
$values[$clark] = $reader->parseCurrentElement()['value'];
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while ($reader->nodeType !== Reader::END_ELEMENT);
@@ -144,7 +157,17 @@ function enum(Reader $reader, $namespace = null) {
$reader->next();
return [];
}
- $reader->read();
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
$currentDepth = $reader->depth;
$values = [];
@@ -204,7 +227,9 @@ function valueObject(Reader $reader, $className, $namespace) {
$reader->next();
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while ($reader->nodeType !== Reader::END_ELEMENT);