The ignoreAttributes itself should be ignored, too.

This commit is contained in:
Alexander M. Turek 2013-07-24 17:20:53 +02:00
parent b45f18b81d
commit dc1fff0fe1
2 changed files with 2 additions and 1 deletions

View File

@ -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));
}

View File

@ -53,6 +53,7 @@ class RedirectControllerTest extends TestCase
'route' => $route,
'permanent' => $permanent,
'additional-parameter' => 'value',
'ignoreAttributes' => $ignoreAttributes
),
);