[HttpKernel] fixed the hinclude fragment renderer when the template is empty

This commit is contained in:
Fabien Potencier 2013-02-06 16:51:32 +01:00
parent 3446cb219a
commit 5a2caa5e85

View File

@ -65,7 +65,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
}
$template = isset($options['default']) ? $options['default'] : $this->globalDefaultTemplate;
if (null !== $this->templating && $this->templateExists($template)) {
if (null !== $this->templating && $template && $this->templateExists($template)) {
$content = $this->templating->render($template);
} else {
$content = $template;