Skip to content

Commit

Permalink
Set status code only if not set yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Apr 5, 2012
1 parent fb8751a commit a8b4205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EventListener/ViewResponseListener.php
Expand Up @@ -84,7 +84,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
if ($configuration->getTemplateVar()) {
$view->setTemplateVar($configuration->getTemplateVar());
}
if ($configuration->getStatusCode()) {
if (null === $view->getStatusCode() && $configuration->getStatusCode()) {
$view->setStatusCode($configuration->getStatusCode());
}
}
Expand Down

0 comments on commit a8b4205

Please sign in to comment.