diff options
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/Api.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 4f32ad427..b41f090dd 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -52,7 +52,7 @@ class Api extends MY_Controller { } $c= new $class; - if (!method_exists($c, $function)) { + if (!method_exists($c, $function) || !is_callable([$c, $function])) { throw new \exceptions\UserInputException("api/unknown-endpoint", "Unknown endpoint requested"); } return $this->send_json_reply($c->$function()); |