diff --git a/application/Core/Application.php b/application/Core/Application.php index f6976ed..b5235bb 100644 --- a/application/Core/Application.php +++ b/application/Core/Application.php @@ -37,8 +37,9 @@ public function __construct() $this->url_controller = new $controller(); // check for method: does such a method exist in the controller ? - if (method_exists($this->url_controller, $this->url_action)) { - + if (method_exists($this->url_controller, $this->url_action) && + is_callable(array($this->url_controller, $this->url_action))) { + if (!empty($this->url_params)) { // Call the method and pass arguments to it call_user_func_array(array($this->url_controller, $this->url_action), $this->url_params);