You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
update smarty (4.1.1 -> 4.3.0) (add PHP 8.2 support, fixes for PHP 8.1; also fixes #541 where using a Turkish locale broke smarty's autoloader)
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
* @property Smarty_Internal_Method_RegisterPlugin $registerPlugin
|
||||
* @property mixed|\Smarty_Template_Cached configLoad
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Smarty_Internal_Extension_Handler
|
||||
{
|
||||
public $objType = null;
|
||||
@@ -88,20 +89,19 @@ class Smarty_Internal_Extension_Handler
|
||||
$objType = $data->_objType;
|
||||
$propertyType = false;
|
||||
if (!isset($this->resolvedProperties[ $match[ 0 ] ][ $objType ])) {
|
||||
$property = isset($this->resolvedProperties[ 'property' ][ $basename ]) ?
|
||||
$this->resolvedProperties[ 'property' ][ $basename ] :
|
||||
$property = $this->resolvedProperties[ 'property' ][ $basename ] = strtolower(
|
||||
join(
|
||||
'_',
|
||||
preg_split(
|
||||
'/([A-Z][^A-Z]*)/',
|
||||
$basename,
|
||||
-1,
|
||||
PREG_SPLIT_NO_EMPTY |
|
||||
PREG_SPLIT_DELIM_CAPTURE
|
||||
)
|
||||
$property = $this->resolvedProperties['property'][$basename] ??
|
||||
$this->resolvedProperties['property'][$basename] = smarty_strtolower_ascii(
|
||||
join(
|
||||
'_',
|
||||
preg_split(
|
||||
'/([A-Z][^A-Z]*)/',
|
||||
$basename,
|
||||
-1,
|
||||
PREG_SPLIT_NO_EMPTY |
|
||||
PREG_SPLIT_DELIM_CAPTURE
|
||||
)
|
||||
);
|
||||
)
|
||||
);
|
||||
if ($property !== false) {
|
||||
if (property_exists($data, $property)) {
|
||||
$propertyType = $this->resolvedProperties[ $match[ 0 ] ][ $objType ] = 1;
|
||||
@@ -145,7 +145,7 @@ class Smarty_Internal_Extension_Handler
|
||||
public function upperCase($name)
|
||||
{
|
||||
$_name = explode('_', $name);
|
||||
$_name = array_map('ucfirst', $_name);
|
||||
$_name = array_map('smarty_ucfirst_ascii', $_name);
|
||||
return implode('_', $_name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user