Skip to content

Commit

Permalink
Fix PHP 8.1 htmlspecialchars deprecation (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkreitz committed Jul 14, 2022
1 parent 44bac8d commit 382d663
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $
}
// autoescape html
if ($compiler->template->smarty->escape_html) {
$output = "htmlspecialchars({$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
$output = "htmlspecialchars((string) {$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
}
// loop over registered filters
if (!empty($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ])) {
Expand Down

0 comments on commit 382d663

Please sign in to comment.