diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-25 22:29:05 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-25 22:29:05 +0000 |
commit | b6f44334d9f827ac78aa8e0dfb428b8b6bcb0328 (patch) | |
tree | 1ada319f911ad5dd57f6d511ecc6f5509cfc2de7 /core/controllers | |
parent | 75b9a7872c1f80d1e3a95796ab4b46ed6ff76e2c (diff) |
Make sure admin method exist before we call them, else we'll just recurse into Admin_Controller::__call() again
Diffstat (limited to 'core/controllers')
-rw-r--r-- | core/controllers/admin.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/controllers/admin.php b/core/controllers/admin.php index 6f4ec47a..d83a0d6f 100644 --- a/core/controllers/admin.php +++ b/core/controllers/admin.php @@ -43,6 +43,10 @@ class Admin_Controller extends Controller { $method = "index"; } + if (!method_exists($controller_name, $method)) { + return kohana::show_404(); + } + call_user_func_array(array(new $controller_name, $method), $args); } } |