Make sure admin method exist before we call them, else we'll just recurse into Admin_Controller::__call() again

This commit is contained in:
Bharat Mediratta
2008-12-25 22:29:05 +00:00
parent 75b9a7872c
commit b6f44334d9
+4
View File
@@ -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);
}
}