Add a proper test for server side rendering (can check syntax errors). re #171

This commit is contained in:
Sébastien Lucas 2014-08-27 10:02:15 +02:00
parent be50ee2cb8
commit 7ae6041c29
2 changed files with 28 additions and 8 deletions

View file

@ -31,6 +31,11 @@ function serverSideRender ($data) {
"header" => $header,
"footer" => $footer,
"main" => $main));
// If there is a syntax error in the function created
// $dot will be equal to FALSE
if (!$dot) {
return FALSE;
}
// Execute the template
if (!empty ($data)) {
return $dot ($data);