Upgrade from Smarty 3 to Smarty 4 to be PHP 8.1 compatible

Remove all Smarty4 dedicated tests, all are done in the same test file
like before
This commit is contained in:
Clemens Schwaighofer
2022-04-06 15:12:50 +09:00
parent 4b0e9b44c3
commit f8ee6044f9
478 changed files with 33447 additions and 12496 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty upper modifier plugin
* Type: modifier
* Name: lower
* Purpose: convert string to uppercase
*
* @link https://www.smarty.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
* @author Uwe Tews
*
* @param array $params parameters
*
* @return string with compiled code
*/
function smarty_modifiercompiler_upper($params)
{
if (Smarty::$_MBSTRING) {
return 'mb_strtoupper(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
}
// no MBString fallback
return 'strtoupper(' . $params[ 0 ] . ')';
}