Always provide a string to TwigSource. Fixes #4209.

This commit is contained in:
Luke Towers 2019-03-27 13:17:26 -06:00
parent 9113e6f418
commit 936525f99b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
/**