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
983a631e60
commit
f4db78c468
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 {
|
||||
$literal = new self();
|
||||
|
||||
if ($reader->isEmptyElement) {
|
||||
$literal->value = '';
|
||||
} else {
|
||||
$literal->value = $reader->readText();
|
||||
}
|
||||
|
||||
$reader->read();
|
||||
|
||||
return $literal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue