Skip to content

Commit

Permalink
Sets _format attribute only if it wasn't set previously by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
iambrosi committed Mar 11, 2012
1 parent 0d89f13 commit aa53b88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
Expand Up @@ -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']);
}
Expand Down

0 comments on commit aa53b88

Please sign in to comment.