Skip to content

Commit 252b43f

Browse files
authored
Merge pull request #870 from bartdenhoed/patch-1
Change to is_callable for catching not public functions
2 parents 2572aaa + 1121d24 commit 252b43f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/core/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function __construct()
3737
require Config::get('PATH_CONTROLLER') . $this->controller_name . '.php';
3838
$this->controller = new $this->controller_name();
3939

40-
// check for method: does such a method exist in the controller ?
41-
if (method_exists($this->controller, $this->action_name)) {
40+
// check are controller and method existing and callable?
41+
if (is_callable(array($this->controller, $this->action_name))) {
4242
if (!empty($this->parameters)) {
4343
// call the method and pass arguments to it
4444
call_user_func_array(array($this->controller, $this->action_name), $this->parameters);

0 commit comments

Comments
 (0)