소스 검색

[WebProfiler] Normalize header name and use a single reference

Victor Berchet 14 년 전
부모
커밋
40dac2363e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Symfony/Bundle/WebProfilerBundle/WebDebugToolbarListener.php

+ 2 - 2
src/Symfony/Bundle/WebProfilerBundle/WebDebugToolbarListener.php

@@ -53,8 +53,8 @@ class WebDebugToolbarListener
 
         if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) {
             $response->setContent(
-                sprintf('<html><head></head><body><h1>This Request redirects to<br /><a href="%s">%s</a>.</h1><h4>The redirect was intercepted by the web debug toolbar to help debugging.<br/>For more information, see the "intercept-redirects" option of the Profiler.</h4></body></html>',
-                $response->headers->get('location'), $response->headers->get('location'))
+                sprintf('<html><head></head><body><h1>This Request redirects to<br /><a href="%1$s">%1$s</a>.</h1><h4>The redirect was intercepted by the web debug toolbar to help debugging.<br/>For more information, see the "intercept-redirects" option of the Profiler.</h4></body></html>',
+                $response->headers->get('Location'))
             );
             $response->setStatusCode(200);
             $response->headers->remove('Location');