Skip to content

Commit

Permalink
Safety in case of missing methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 8, 2010
1 parent 6ddeae9 commit b5b9c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/dispatcher/midgard3.php
Expand Up @@ -236,11 +236,11 @@ private function dispatch_route(midgardmvc_core_request $request, array $argumen
// Run the route and set appropriate data
try
{
$controller->data = array();
if (!method_exists($controller, $action_method))
{
throw new midgardmvc_exception_httperror("{$request_method} method not allowed", 405);
}
$controller->data = array();
$controller->$action_method($arguments);
}
catch (Exception $e)
Expand Down

0 comments on commit b5b9c12

Please sign in to comment.