diff --git a/modules/cms/classes/CmsCompoundObject.php b/modules/cms/classes/CmsCompoundObject.php index ad9275c4c..a28613ed2 100644 --- a/modules/cms/classes/CmsCompoundObject.php +++ b/modules/cms/classes/CmsCompoundObject.php @@ -231,6 +231,7 @@ class CmsCompoundObject extends CmsObject $content[] = 'code.PHP_EOL.'?>'; } else { $content[] = $this->code; + } } $content[] = $this->markup; diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index f2f79c142..0c4bca326 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -278,8 +278,9 @@ class Controller extends BaseController $template = $this->twig->loadTemplate($this->page->getFullPath()); $this->pageContents = $template->render($this->vars); CmsException::unmask(); - } else + } else { $this->pageContents = $apiResult; + } /* * Render the layout diff --git a/modules/cms/twig/PlaceholderTokenParser.php b/modules/cms/twig/PlaceholderTokenParser.php index ba4518ef7..767b6a0a0 100644 --- a/modules/cms/twig/PlaceholderTokenParser.php +++ b/modules/cms/twig/PlaceholderTokenParser.php @@ -43,8 +43,9 @@ class PlaceholderTokenParser extends Twig_TokenParser $body = $this->parser->subparse([$this, 'decidePlaceholderEnd'], true); $stream->expect(Twig_Token::BLOCK_END_TYPE); - } else + } else { $params = $this->loadParams($stream); + } return new PlaceholderNode($name, $params, $body, $token->getLine(), $this->getTag()); } @@ -75,7 +76,11 @@ class PlaceholderTokenParser extends Twig_TokenParser break; default: - throw new Twig_Error_Syntax(sprintf('Invalid syntax in the placeholder tag. Line %s', $lineno), $stream->getCurrent()->getLine(), $stream->getFilename()); + throw new Twig_Error_Syntax( + sprintf('Invalid syntax in the placeholder tag. Line %s', $lineno), + $stream->getCurrent()->getLine(), + $stream->getFilename() + ); break; } }