diff --git a/core/lib/Drupal/Core/Form/FormSubmitter.php b/core/lib/Drupal/Core/Form/FormSubmitter.php index 172a44d..ddb0fc6 100644 --- a/core/lib/Drupal/Core/Form/FormSubmitter.php +++ b/core/lib/Drupal/Core/Form/FormSubmitter.php @@ -150,7 +150,7 @@ public function redirectForm(FormStateInterface $form_state) { $url = $this->urlGenerator->generateFromRoute( $this->currentRouteMatch->getRouteName(), - $this->currentRouteMatch->getParameters()->all(), + $this->currentRouteMatch->getRawParameters()->all(), array( 'query' => $request->query->all(), 'absolute' => TRUE, diff --git a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php index 532a572..4b7715e 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\ParameterBag; /** * @coversDefaultClass \Drupal\Core\Form\FormSubmitter @@ -112,15 +113,15 @@ public function testRedirectWithNull() { $form_submitter = $this->getFormSubmitter(); $this->urlGenerator->expects($this->once()) ->method('generateFromRoute') - ->with('front', [], array('query' => array(), 'absolute' => TRUE)) + ->with('', [], array('query' => array(), 'absolute' => TRUE)) ->willReturn(''); $this->routeMatch->expects($this->once()) ->method('getRouteName') - ->willReturn('front'); + ->willReturn(''); $this->routeMatch->expects($this->once()) - ->method('getParameters') - ->willReturn([]); + ->method('getRawParameters') + ->willReturn(new ParameterBag()); $form_state = $this->getMock('Drupal\Core\Form\FormStateInterface'); $form_state->expects($this->once())