Missed part of commit a3cbdc46 in the merge

This commit is contained in:
Simon Wisselink
2023-08-07 23:49:24 +02:00
parent 515c14b24f
commit 3750c644a5

View File

@ -14,7 +14,7 @@ class StripTagsModifierCompiler extends Base {
public function compile($params, \Smarty\Compiler\Template $compiler) {
if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') {
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]} ?: '')";
return "preg_replace('!<[^>]*?>!', ' ', (string) {$params[0]})";
} else {
return 'strip_tags((string) ' . $params[ 0 ] . ')';
}