From 936525f99b813a531c4abae0cb1cd3786962bde6 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 27 Mar 2019 13:17:26 -0600 Subject: [PATCH] Always provide a string to TwigSource. Fixes #4209. --- modules/cms/twig/Loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/twig/Loader.php b/modules/cms/twig/Loader.php index 59a85f70a..88670f0e8 100644 --- a/modules/cms/twig/Loader.php +++ b/modules/cms/twig/Loader.php @@ -60,7 +60,7 @@ class Loader extends LoaderBase implements TwigLoaderInterface $dataHolder = (object) ['content' => $content]; Event::fire('cms.template.processTwigContent', [$this->obj, $dataHolder]); - return new TwigSource($dataHolder->content, $name); + return new TwigSource((string) $dataHolder->content, $name); } /**