fix define method in registered objects

This commit is contained in:
Andrey Shpota
2016-08-04 12:28:19 +03:00
parent f74a0d575a
commit a3c1a152ca

View File

@@ -49,7 +49,7 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
unset($_attr[ 'assign' ]); unset($_attr[ 'assign' ]);
} }
// method or property ? // method or property ?
if (method_exists($compiler->smarty->registered_objects[ $tag ][ 0 ], $method)) { if (is_callable(array($compiler->smarty->registered_objects[ $tag ][ 0 ], $method))) {
// convert attributes into parameter array string // convert attributes into parameter array string
if ($compiler->smarty->registered_objects[ $tag ][ 2 ]) { if ($compiler->smarty->registered_objects[ $tag ][ 2 ]) {
$_paramsArray = array(); $_paramsArray = array();