Skip to content

Commit

Permalink
Merge pull request #110 from frugan-dev/master
Browse files Browse the repository at this point in the history
fix: Cannot assign null to property DOMNode::* of type string
  • Loading branch information
voku authored May 25, 2024
2 parents f8f09f1 + 0c27c54 commit 0381386
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;

Check failure on line 184 in src/voku/helper/AbstractSimpleHtmlDom.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Method voku\helper\AbstractSimpleHtmlDom::__set() with return type void returns mixed but should not return anything.
}
}

return $this->setAttribute($name, $value);

Check failure on line 188 in src/voku/helper/AbstractSimpleHtmlDom.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Method voku\helper\AbstractSimpleHtmlDom::__set() with return type void returns voku\helper\SimpleHtmlDomInterface but should not return anything.
Expand Down

0 comments on commit 0381386

Please sign in to comment.