mirror of
https://github.com/getgrav/grav.git
synced 2026-07-13 00:22:46 +02:00
Add check to evaluateFunc()
Prevents obscure Twig error when $input is not set
This commit is contained in:
@@ -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 }}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user