Skip to content

Commit 79acc23

Browse files
committed
The ignoreAttributes itself should be ignored, too.
1 parent a2bf41c commit 79acc23

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Controller/RedirectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function redirectAction(Request $request, $route, $permanent = false, $ig
4949
$attributes = array();
5050
if (false === $ignoreAttributes || is_array($ignoreAttributes)) {
5151
$attributes = $request->attributes->get('_route_params');
52-
unset($attributes['route'], $attributes['permanent']);
52+
unset($attributes['route'], $attributes['permanent'], $attributes['ignoreAttributes']);
5353
if ($ignoreAttributes) {
5454
$attributes = array_diff_key($attributes, array_flip($ignoreAttributes));
5555
}

Tests/Controller/RedirectControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function testRoute($permanent, $ignoreAttributes, $expectedCode, $expecte
5353
'route' => $route,
5454
'permanent' => $permanent,
5555
'additional-parameter' => 'value',
56+
'ignoreAttributes' => $ignoreAttributes
5657
),
5758
);
5859

0 commit comments

Comments
 (0)