From dc1fff0fe1d5d6a65b364b62b60f1ec03c695129 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 24 Jul 2013 17:20:53 +0200 Subject: [PATCH] The ignoreAttributes itself should be ignored, too. --- .../Bundle/FrameworkBundle/Controller/RedirectController.php | 2 +- .../FrameworkBundle/Tests/Controller/RedirectControllerTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php index 59df4ae2a6..8d515d4bcb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php @@ -49,7 +49,7 @@ class RedirectController extends ContainerAware $attributes = array(); if (false === $ignoreAttributes || is_array($ignoreAttributes)) { $attributes = $request->attributes->get('_route_params'); - unset($attributes['route'], $attributes['permanent']); + unset($attributes['route'], $attributes['permanent'], $attributes['ignoreAttributes']); if ($ignoreAttributes) { $attributes = array_diff_key($attributes, array_flip($ignoreAttributes)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php index 6bd636ae2a..9baec8dd95 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php @@ -53,6 +53,7 @@ class RedirectControllerTest extends TestCase 'route' => $route, 'permanent' => $permanent, 'additional-parameter' => 'value', + 'ignoreAttributes' => $ignoreAttributes ), );