Skip to content

Commit

Permalink
Allow option elements to have no value attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Sep 4, 2015
1 parent 4f405b8 commit 3efabef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Dom/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ private function getValue() {
case "MENU":
case "OPTION":
$value = $this->getAttribute("value");
if(empty($value)) {
$value = $this->textContent;
}
break;

// Loop through a select's option elements and set the 'selected' attribute
Expand Down

0 comments on commit 3efabef

Please sign in to comment.