From e10c1626678b197e7458f135a4c1abf4216c8d59 Mon Sep 17 00:00:00 2001 From: soulshockers Date: Fri, 5 Aug 2016 18:51:27 +0300 Subject: [PATCH] Fixed calling dynamic methods for dynamically extended widgets. --- modules/backend/classes/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index 35426d156..f8230a40f 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -511,7 +511,7 @@ class Controller extends Extendable throw new SystemException(Lang::get('backend::lang.widget.not_bound', ['name'=>$widgetName])); } - if (($widget = $this->widget->{$widgetName}) && method_exists($widget, $handlerName)) { + if (($widget = $this->widget->{$widgetName}) && $widget->methodExists($handlerName)) { $result = call_user_func_array([$widget, $handlerName], $this->params); return ($result) ?: true; } @@ -542,7 +542,7 @@ class Controller extends Extendable $this->execPageAction($this->action, $this->params); foreach ((array) $this->widget as $widget) { - if (method_exists($widget, $handler)) { + if ($widget->methodExists($handler)) { $result = call_user_func_array([$widget, $handler], $this->params); return ($result) ?: true; }