Skip to content

Commit

Permalink
Cannot assign null to property DOMNode::* of type string (voku#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
micbis committed May 22, 2024
1 parent d88b719 commit 740f527
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/voku/helper/AbstractSimpleHtmlDom.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,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);
Expand Down

0 comments on commit 740f527

Please sign in to comment.