Skip to content
Browse files

cosmetics

  • Loading branch information...
1 parent eccaeae commit 00ff7c5068e437f2712d15285a1d61f410adc073 @lsmith77 lsmith77 committed Sep 26, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 EventListener/ViewResponseListener.php
View
7 EventListener/ViewResponseListener.php
@@ -81,7 +81,8 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
$view = new View($view);
}
- if (!$vars = $request->attributes->get('_template_vars')) {
+ $vars = $request->attributes->get('_template_vars');
+ if (!$vars) {
$vars = $request->attributes->get('_template_default_vars');
}
@@ -100,11 +101,13 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
$view->setData($parameters);
}
- if ($template = $request->attributes->get('_template')) {
+ $template = $request->attributes->get('_template');
+ if ($template) {
if ($template instanceof TemplateReference) {
$template->set('format', null);
$template->set('engine', null);
}
+
$view->setTemplate($template);
}

0 comments on commit 00ff7c5

Please sign in to comment.
Something went wrong with that request. Please try again.