diff options
author | Mario <mario@mariovavti.com> | 2019-04-25 11:24:09 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-04-25 11:24:09 +0200 |
commit | f1c07977809ce3221286d53e99f0d91145b1166f (patch) | |
tree | 4c067a3b701ea56f10070c386b26a30f93666eb0 /vendor/sabre/vobject/lib/Parser/XML | |
parent | 701167bc125700efb3e6ce759b85bcb4d36ee42e (diff) | |
download | volse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.tar.gz volse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.tar.bz2 volse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.zip |
Revert "update composer libs"
This reverts commit e779335d060b3a51d6a144d23af4097ae6801473
Diffstat (limited to 'vendor/sabre/vobject/lib/Parser/XML')
-rw-r--r-- | vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php b/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php index e26540036..14d798433 100644 --- a/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php +++ b/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php @@ -13,8 +13,8 @@ use Sabre\Xml as SabreXml; * @author Ivan Enderlin * @license http://sabre.io/license/ Modified BSD License */ -class KeyValue extends SabreXml\Element\KeyValue -{ +class KeyValue extends SabreXml\Element\KeyValue { + /** * The deserialize method is called during xml parsing. * @@ -37,12 +37,11 @@ class KeyValue extends SabreXml\Element\KeyValue * * @return mixed */ - public static function xmlDeserialize(SabreXml\Reader $reader) - { + static function xmlDeserialize(SabreXml\Reader $reader) { + // If there's no children, we don't do anything. if ($reader->isEmptyElement) { $reader->next(); - return []; } @@ -50,16 +49,22 @@ class KeyValue extends SabreXml\Element\KeyValue $reader->read(); do { - if (SabreXml\Reader::ELEMENT === $reader->nodeType) { + + if ($reader->nodeType === SabreXml\Reader::ELEMENT) { + $name = $reader->localName; $values[$name] = $reader->parseCurrentElement()['value']; + } else { $reader->read(); } - } while (SabreXml\Reader::END_ELEMENT !== $reader->nodeType); + + } while ($reader->nodeType !== SabreXml\Reader::END_ELEMENT); $reader->read(); return $values; + } + } |