diff --git a/modules/civiremote_event/src/Form/RegisterForm.php b/modules/civiremote_event/src/Form/RegisterForm.php index e07f6eb..98739c8 100644 --- a/modules/civiremote_event/src/Form/RegisterForm.php +++ b/modules/civiremote_event/src/Form/RegisterForm.php @@ -1212,11 +1212,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { /* @var Url $url */ $url = Drupal::service('path.validator') ->getUrlIfValid($config->get('form_redirect_route')); - $form_state->setRedirect( - $url->getRouteName(), - $url->getRouteParameters(), - $url->getOptions() - ); + $form_state->setRedirectUrl($url); } } catch (Exception $exception) { diff --git a/modules/civiremote_event/src/Form/RegistrationCancelForm.php b/modules/civiremote_event/src/Form/RegistrationCancelForm.php index 840514e..a11ea4c 100644 --- a/modules/civiremote_event/src/Form/RegistrationCancelForm.php +++ b/modules/civiremote_event/src/Form/RegistrationCancelForm.php @@ -136,11 +136,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { /* @var Url $url */ $url = Drupal::service('path.validator') ->getUrlIfValid($config->get('form_redirect_route')); - $form_state->setRedirect( - $url->getRouteName(), - $url->getRouteParameters(), - $url->getOptions() - ); + $form_state->setRedirectUrl($url); } /** diff --git a/modules/civiremote_event/src/Form/RegistrationUpdateForm.php b/modules/civiremote_event/src/Form/RegistrationUpdateForm.php index 0189597..1c1409b 100644 --- a/modules/civiremote_event/src/Form/RegistrationUpdateForm.php +++ b/modules/civiremote_event/src/Form/RegistrationUpdateForm.php @@ -84,11 +84,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { /* @var Url $url */ $url = Drupal::service('path.validator') ->getUrlIfValid($config->get('form_redirect_route')); - $form_state->setRedirect( - $url->getRouteName(), - $url->getRouteParameters(), - $url->getOptions() - ); + $form_state->setRedirectUrl($url); } } catch (Exception $exception) {