aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/Deserializer/functions.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
committerMario Vavti <mario@mariovavti.com>2019-04-25 08:52:50 +0200
commite779335d060b3a51d6a144d23af4097ae6801473 (patch)
tree2427765313f715a0e5b48228abe5200cb82b787f /vendor/sabre/xml/lib/Deserializer/functions.php
parente937e8fff96a935b14a479c062f6b0d00b90b99d (diff)
downloadvolse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.gz
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.tar.bz2
volse-hubzilla-e779335d060b3a51d6a144d23af4097ae6801473.zip
update composer libs
Diffstat (limited to 'vendor/sabre/xml/lib/Deserializer/functions.php')
-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);