@fabpot For me it looks like @jalliot is right... It looks like you should use:

```php
if (null !== $request && !isset($reference->arguments['_format'])) {
```
Because line before you have overwritten `$arguments` variable to only contain:
```php
array('_controller' => $reference->controller);