From 19770a375f776319710d88dad1508e0c4f9d7c0c Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 11 Aug 2019 15:57:39 +0300 Subject: [PATCH] Flextype Core: ShortcodesTwigExtension #186 - issue with null variables - fixed --- flextype/twig/ShortcodesTwigExtension.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ''; } }