Преглед на файлове

[DomCrawler] ChoiceFormField should take the content when value is unavailable

stealth35 преди 13 години
родител
ревизия
bca551e86f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php

+ 1 - 1
src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php

@@ -207,7 +207,7 @@ class ChoiceFormField extends FormField
 
             $found = false;
             foreach ($this->xpath->query('descendant::option', $this->node) as $option) {
-                $this->options[] = $option->getAttribute('value');
+                $this->options[] = $option->hasAttribute('value') ? $option->getAttribute('value') : $option->nodeValue;
 
                 if ($option->getAttribute('selected')) {
                     $found = true;