From 509e7d2a12be20806fd92ea9e5d92f4f4231f5d3 Mon Sep 17 00:00:00 2001 From: Stefan Talen Date: Sat, 18 Oct 2014 12:03:48 +0200 Subject: [PATCH] Fixing issues with files in modules/cms --- modules/cms/classes/CmsCompoundObject.php | 1 + modules/cms/classes/Controller.php | 3 ++- modules/cms/twig/PlaceholderTokenParser.php | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) 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; } }