From 1121d24c87e198d2e5900c959be801115d3efc5a Mon Sep 17 00:00:00 2001 From: Bart den Hoed Date: Tue, 27 Feb 2018 21:37:36 +0100 Subject: [PATCH] Change to is_callable for catching not public functions --- application/core/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/core/Application.php b/application/core/Application.php index d84b3499b..4cc689c7d 100644 --- a/application/core/Application.php +++ b/application/core/Application.php @@ -37,8 +37,8 @@ public function __construct() require Config::get('PATH_CONTROLLER') . $this->controller_name . '.php'; $this->controller = new $this->controller_name(); - // check for method: does such a method exist in the controller ? - if (method_exists($this->controller, $this->action_name)) { + // check are controller and method existing and callable? + if (is_callable(array($this->controller, $this->action_name))) { if (!empty($this->parameters)) { // call the method and pass arguments to it call_user_func_array(array($this->controller, $this->action_name), $this->parameters);