From 0c27c54bece43cb223ce5bbdd5abafe262fd49b7 Mon Sep 17 00:00:00 2001 From: Frugan Date: Sun, 28 Apr 2024 21:50:31 +0200 Subject: [PATCH] fix: Cannot assign null to property DOMNode::* of type string --- src/voku/helper/AbstractSimpleHtmlDom.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/voku/helper/AbstractSimpleHtmlDom.php b/src/voku/helper/AbstractSimpleHtmlDom.php index 852114a..65c75cb 100644 --- a/src/voku/helper/AbstractSimpleHtmlDom.php +++ b/src/voku/helper/AbstractSimpleHtmlDom.php @@ -171,7 +171,9 @@ public function __set($name, $value) $value = (string)$value; } - return $this->node->{$nameOrig} = $value; + if (!is_null($value)) { + return $this->node->{$nameOrig} = $value; + } } return $this->setAttribute($name, $value);