Add check to evaluateFunc()

Prevents obscure Twig error when $input is not set
This commit is contained in:
Flavio Copes
2016-04-19 19:14:54 +02:00
parent 643a977df6
commit 96c2bae4f8

View File

@@ -581,6 +581,9 @@ class TwigExtension extends \Twig_Extension
*/
public function evaluateFunc($input)
{
if (!$input) { //prevent an obscure Twig error if $input is not set
$input = '""';
}
return $this->grav['twig']->processString("{{ $input }}");
}