diff --git a/flextype/twig/ShortcodesTwigExtension.php b/flextype/twig/ShortcodesTwigExtension.php index fde79f88..06b94794 100644 --- a/flextype/twig/ShortcodesTwigExtension.php +++ b/flextype/twig/ShortcodesTwigExtension.php @@ -42,8 +42,12 @@ class ShortcodesTwigExtension extends Twig_Extension /** * Shorcode process */ - public function shortcode(string $value) : string + public function shortcode($value) : string { - return $this->flextype->shortcodes->process($value); + if ($value !== null) { + return $this->flextype->shortcodes->process($value); + } + + return ''; } }