Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set status code only if not set yet

  • Loading branch information...
commit a8b4205f4ecb23908826bae59ebb721ef0b749a2 1 parent fb8751a
@Seldaek Seldaek authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  EventListener/ViewResponseListener.php
View
2  EventListener/ViewResponseListener.php
@@ -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());
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.