Skip to content

Commit

Permalink
fix: Cannot assign null to property DOMNode::* of type string
Browse files Browse the repository at this point in the history
  • Loading branch information
frugan-dev committed Apr 28, 2024
1 parent e2ced08 commit 0c27c54
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 @@ -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;

Check failure on line 175 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 179 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 0c27c54

Please sign in to comment.