From bca551e86fdba47064454fbabcaf88801aa5da7f Mon Sep 17 00:00:00 2001 From: stealth35 Date: Tue, 20 Sep 2011 19:08:17 +0300 Subject: [PATCH] [DomCrawler] ChoiceFormField should take the content when value is unavailable --- src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php index 0cb137c094..e9f3c958e7 100644 --- a/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +++ b/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;