Fix FormTypeParser to reflect last Symfony2 changes

See: cd7835d8d2 (L5L97)
This commit is contained in:
William DURAND 2012-07-14 14:12:12 +02:00
parent b19822dde5
commit f8ab93a167

View File

@ -61,7 +61,7 @@ class FormTypeParser
$config = $child->getConfig(); $config = $child->getConfig();
$bestType = ''; $bestType = '';
foreach ($config->getTypes() as $type) { for ($type = $config->getType(); null !== $type; $type = $type->getParent()) {
if (isset($this->mapTypes[$type->getName()])) { if (isset($this->mapTypes[$type->getName()])) {
$bestType = $this->mapTypes[$type->getName()]; $bestType = $this->mapTypes[$type->getName()];
} }