소스 검색

[Routing] Fix dumper so it doesn't print trailing whitespace

This fixes tests from the previous commit
Jordi Boggiano 14 년 전
부모
커밋
6c7f484f6b
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

+ 5 - 1
src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

@@ -121,7 +121,11 @@ EOF;
 
                 foreach ($this->compileRoutes($route, $supportsRedirections, $prefix) as $line) {
                     foreach (explode("\n", $line) as $l) {
-                        $code[] = $indent.$l;
+                        if ($l) {
+                            $code[] = $indent.$l;
+                        } else {
+                            $code[] = $l;
+                        }
                     }
                 }