From efe0915280781eb673c1095e3d55e8a098cd5843 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sun, 21 Apr 2019 15:48:21 +0200 Subject: [PATCH] Skipping empty values --- src/AbstractDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AbstractDocument.php b/src/AbstractDocument.php index f119b9e..8cd014e 100644 --- a/src/AbstractDocument.php +++ b/src/AbstractDocument.php @@ -551,7 +551,8 @@ public function getValue( $expr, $context = null ) */ public function setValue( $expr, $value, $context = null ) { - $this->getElement($expr, $context)->nodeValue = $value; + if (!is_null($value)) + $this->getElement($expr, $context)->nodeValue = $value; return $this; }