mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-28 18:02:07 +02:00
Fixed PHP8.1 deprecation errors in upper modifier #788
This commit is contained in:
@@ -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 ] . ' ?? \'\')';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user