schmittjoh/JMSTranslationBundle — pull request #153 by tarjei (2013-09-27 09:27:25+00:00)
Title: Handle variants where attr is not an array but a function pointer.

Example code that chrashes without this fix:

```php
$resolver->setDefaults(array(
'error_bubbling' => false,
'invalid_message' => "Invalid resource selected",
'type' => false,

'allowed_resource_types' => false,
'required' => false,
'attr' => function(Options $options) use ($router) {
return array(
'placeholder' => "Search for a movie",
'class' => 'resource_selector auto_complete',
"data-url-all" => ($options['allowed_resource_types'] !== false) ?
$router->generate('admin_resource_query_type', array('type' => $options['allowed_resource_types'])) :
$router->generate('admin_resource_query', array())
);

}
)
);

```