Skip to content

Commit

Permalink
Use setAttribute() for adding an attribute
Browse files Browse the repository at this point in the history
Co-authored-by: Weston Ruter <[email protected]>
  • Loading branch information
schlessera and westonruter authored Apr 6, 2021
1 parent 6672ac9 commit 7b30254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dom/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function setAttribute($name, $value)
public function addBooleanAttribute($name)
{
$attribute = new DOMAttr($name);
$result = $this->appendChild($attribute);
$result = $this->setAttributeNode($attribute);

if (!$result instanceof DOMAttr) {
return false;
Expand Down

0 comments on commit 7b30254

Please sign in to comment.