- allow integer as attribute name in plugin calls

This commit is contained in:
Uwe.Tews
2009-11-18 21:51:20 +00:00
parent 4e98b48c7c
commit 6b506c4b40
6 changed files with 713 additions and 708 deletions

View File

@@ -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