Merge pull request #263 from a-shpota/fix-method-define

Fix define method in registered objects
This commit is contained in:
uwetews
2016-08-04 23:11:59 +02:00
committed by GitHub

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();