Skip to content

Commit

Permalink
minor #6748 Fix web/front.php (ranqiangjun)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Fix web/front.php

## $controller always return false.

    $controller = $controllerResolver->getController($request);
    $arguments = $argumentResolver->getArguments($request, $controller);

The two lines before the `try ... catch` should run after:

    $request->attributes->add($matcher->match($request->getPathInfo()));

The three lines already exist inside the `try ... catch` which works fine and properly after removed those two lines.

([http://symfony.com/doc/master/create_framework/http_kernel_controller_resolver.html](http://symfony.com/doc/master/create_framework/http_kernel_controller_resolver.html))

Commits
-------

86bb5ac Fix web/front.php
  • Loading branch information
weaverryan committed Aug 2, 2016
2 parents 299d3b4 + 86bb5ac commit fb24c74
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions create_framework/http_kernel_controller_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ Let's conclude with the new version of our framework::
$controllerResolver = new HttpKernel\Controller\ControllerResolver();
$argumentResolver = new HttpKernel\Controller\ArgumentResolver();

$controller = $controllerResolver->getController($request);
$arguments = $argumentResolver->getArguments($request, $controller);

try {
$request->attributes->add($matcher->match($request->getPathInfo()));

Expand Down

0 comments on commit fb24c74

Please sign in to comment.