Fixed PHP8.1 deprecation errors in upper modifier #788

This commit is contained in:
Simon Wisselink
2022-09-10 12:34:20 +02:00
parent 1bc7c722a3
commit f8f97b4e2d
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -21,8 +21,8 @@
function smarty_modifiercompiler_upper($params)
{
if (Smarty::$_MBSTRING) {
return 'mb_strtoupper(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
return 'mb_strtoupper(' . $params[ 0 ] . ' ?? \'\', \'' . addslashes(Smarty::$_CHARSET) . '\')';
}
// no MBString fallback
return 'strtoupper(' . $params[ 0 ] . ')';
return 'strtoupper(' . $params[ 0 ] . ' ?? \'\')';
}