mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-03 17:44:06 +02:00
Don't call readText() in an empty element, otherwise
all the subsequent elements are exhausted.
This commit is contained in:
parent
faf4ef87fd
commit
c880b7edcd
1 changed files with 6 additions and 1 deletions
|
|
@ -29,7 +29,12 @@ class Literal extends \SearchDAV\Query\Literal implements XmlDeserializable {
|
||||||
static function xmlDeserialize(Reader $reader): Literal {
|
static function xmlDeserialize(Reader $reader): Literal {
|
||||||
$literal = new self();
|
$literal = new self();
|
||||||
|
|
||||||
|
if ($reader->isEmptyElement) {
|
||||||
|
$literal->value = '';
|
||||||
|
} else {
|
||||||
$literal->value = $reader->readText();
|
$literal->value = $reader->readText();
|
||||||
|
}
|
||||||
|
|
||||||
$reader->read();
|
$reader->read();
|
||||||
|
|
||||||
return $literal;
|
return $literal;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue