Bläddra i källkod

[HttpFoundation] simplified code

Fabien Potencier 14 år sedan
förälder
incheckning
9b1b9373b8
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/Symfony/Component/HttpFoundation/RequestMatcher.php

+ 2 - 2
src/Symfony/Component/HttpFoundation/RequestMatcher.php

@@ -70,7 +70,7 @@ class RequestMatcher implements RequestMatcherInterface
      */
     public function matchMethod($method)
     {
-        $this->methods = array_map('strtolower', is_array($method) ? $method : array($method));
+        $this->methods = array_map('strtoupper', is_array($method) ? $method : array($method));
     }
 
     /**
@@ -89,7 +89,7 @@ class RequestMatcher implements RequestMatcherInterface
      */
     public function matches(Request $request)
     {
-        if (null !== $this->methods && !in_array(strtolower($request->getMethod()), $this->methods)) {
+        if (null !== $this->methods && !in_array($request->getMethod(), $this->methods)) {
             return false;
         }