merged branch Tobion/routerlistener-strtoupper (PR #9070)

This PR was merged into the 2.2 branch.

Discussion
----------

[HttpKernel] remove unneeded strtoupper

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

It is already uppercased by the exception itself: https://github.com/symfony/symfony/blob/2.2/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php#L32

Commits
-------

0b6519f [HttpKernel] remove unneeded strtoupper
This commit is contained in:
Fabien Potencier 2013-09-18 18:04:45 +02:00
commit 510960ed31
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class RouterListener implements EventSubscriberInterface
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), strtoupper(implode(', ', $e->getAllowedMethods())));
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}