diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-06-04 10:19:04 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-06-04 10:19:04 +0200 |
commit | e4ca3609d90bb437061e4b8db95ed0424b25eb76 (patch) | |
tree | aa070e40ab01cb1354cbf879a0fb8b2f570631d5 /vendor/sabre/vobject/lib/Parser/XML/Element | |
parent | 071fba2f7121aeb9690a21398935a53deac09af8 (diff) | |
parent | bc092d8d7815195d62299c0ea54caa4759e6f2e7 (diff) | |
download | volse-hubzilla-4.2.tar.gz volse-hubzilla-4.2.tar.bz2 volse-hubzilla-4.2.zip |
Merge branch '4.2RC'4.2
Diffstat (limited to 'vendor/sabre/vobject/lib/Parser/XML/Element')
-rw-r--r-- | vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php b/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php index 14d798433..e26540036 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,11 +37,12 @@ class KeyValue extends SabreXml\Element\KeyValue { * * @return mixed */ - static function xmlDeserialize(SabreXml\Reader $reader) { - + public static function xmlDeserialize(SabreXml\Reader $reader) + { // If there's no children, we don't do anything. if ($reader->isEmptyElement) { $reader->next(); + return []; } @@ -49,22 +50,16 @@ class KeyValue extends SabreXml\Element\KeyValue { $reader->read(); do { - - if ($reader->nodeType === SabreXml\Reader::ELEMENT) { - + if (SabreXml\Reader::ELEMENT === $reader->nodeType) { $name = $reader->localName; $values[$name] = $reader->parseCurrentElement()['value']; - } else { $reader->read(); } - - } while ($reader->nodeType !== SabreXml\Reader::END_ELEMENT); + } while (SabreXml\Reader::END_ELEMENT !== $reader->nodeType); $reader->read(); return $values; - } - } |