mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 13:21:36 +01:00
- allow integer as attribute name in plugin calls
This commit is contained in:
@@ -34,7 +34,11 @@ class Smarty_Internal_Compile_Object_Function extends Smarty_Internal_CompileBas
|
||||
// convert attributes into parameter array string
|
||||
$_paramsArray = array();
|
||||
foreach ($_attr as $_key => $_value) {
|
||||
$_paramsArray[] = "'$_key'=>$_value";
|
||||
if (is_int($_key)) {
|
||||
$_paramsArray[] = "$_key=>$_value";
|
||||
} else {
|
||||
$_paramsArray[] = "'$_key'=>$_value";
|
||||
}
|
||||
}
|
||||
$_params = 'array(' . implode(",", $_paramsArray) . ')';
|
||||
// compile code
|
||||
|
||||
Reference in New Issue
Block a user