From 6c7f484f6bb8b9fbd68a634e21e498ab769965b8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 29 Jun 2011 03:04:42 +0200 Subject: [PATCH] [Routing] Fix dumper so it doesn't print trailing whitespace This fixes tests from the previous commit --- .../Component/Routing/Matcher/Dumper/PhpMatcherDumper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index ecc4b9df0a..8ef5ce82ae 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/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; + } } }