mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 21:54:07 +09:00
Fix Twig markdown on example text (#3414)
Fix Twig markdown on example text.
When attempting to render the example markdown in email settings, an error is raised.
`An exception has been thrown during the rendering of a template ("{closure}(): Argument #1 ($content) must be of type ?string, Twig\Markup given`
Twig\Markup contains __toString() so casting to string resolves the issue.
This commit is contained in:
1 parent
37f770b65b
commit
66cd67736d
1 file changed
+1
-1
@@ -383,7 +383,7 @@ class Box_TwigExtensions extends AbstractExtension implements InjectionAwareInte
|
||||
|
||||
public function twig_markdown_filter(Twig\Environment $env, $value)
|
||||
{
|
||||
return $this->di['parse_markdown']($value);
|
||||
return $this->di['parse_markdown']((string) $value);
|
||||
}
|
||||
|
||||
public function twig_truncate_filter(Twig\Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
|
||||
|
||||
Reference in new issue
Block a user