From f8ab93a1679dce2320836c60da032ae89533129f Mon Sep 17 00:00:00 2001 From: William DURAND Date: Sat, 14 Jul 2012 14:12:12 +0200 Subject: [PATCH] Fix FormTypeParser to reflect last Symfony2 changes See: https://github.com/symfony/symfony/commit/cd7835d8d2f68de96d3d4d33e9b744c86d519a8f#L5L97 --- Parser/FormTypeParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/FormTypeParser.php b/Parser/FormTypeParser.php index b19de40..4b0b11a 100644 --- a/Parser/FormTypeParser.php +++ b/Parser/FormTypeParser.php @@ -61,7 +61,7 @@ class FormTypeParser $config = $child->getConfig(); $bestType = ''; - foreach ($config->getTypes() as $type) { + for ($type = $config->getType(); null !== $type; $type = $type->getParent()) { if (isset($this->mapTypes[$type->getName()])) { $bestType = $this->mapTypes[$type->getName()]; }