From aa53b887d111aca141682258f85d279139f11079 Mon Sep 17 00:00:00 2001 From: Ismael Ambrosi Date: Sun, 11 Mar 2012 16:56:20 -0300 Subject: [PATCH] Sets _format attribute only if it wasn't set previously by the user --- src/Symfony/Bundle/FrameworkBundle/HttpKernel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php b/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php index fe44fe0131af..6f827b9e4801 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php @@ -133,7 +133,11 @@ public function render($controller, array $options = array()) } } else { $options['attributes']['_controller'] = $controller; - $options['attributes']['_format'] = $request->getRequestFormat(); + + if (!isset($options['attributes']['_format'])) { + $options['attributes']['_format'] = $request->getRequestFormat(); + } + $options['attributes']['_route'] = '_internal'; $subRequest = $request->duplicate($options['query'], null, $options['attributes']); }