summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-25 22:29:05 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-25 22:29:05 +0000
commitb6f44334d9f827ac78aa8e0dfb428b8b6bcb0328 (patch)
tree1ada319f911ad5dd57f6d511ecc6f5509cfc2de7
parent75b9a7872c1f80d1e3a95796ab4b46ed6ff76e2c (diff)
Make sure admin method exist before we call them, else we'll just recurse into Admin_Controller::__call() again
-rw-r--r--core/controllers/admin.php4
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);
}
}