Skip to content
Snippets Groups Projects
Unverified Commit c7774d21 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3238942 by andypost, alexpott:...

Issue #3238942 by andypost, alexpott: \Drupal\Core\Routing\RedirectDestination::get() causes deprecation errors on PHP 8.1
parent 0bed3aee
No related branches found
No related tags found
No related merge requests found
......@@ -57,11 +57,12 @@ public function getAsArray() {
public function get() {
if (!isset($this->destination)) {
$query = $this->requestStack->getCurrentRequest()->query;
if (UrlHelper::isExternal($query->get('destination'))) {
$this->destination = '/';
}
elseif ($query->has('destination')) {
if ($query->has('destination')) {
$this->destination = $query->get('destination');
if (UrlHelper::isExternal($this->destination)) {
// See https://www.drupal.org/node/2454955 for external redirects.
$this->destination = '/';
}
}
else {
$this->destination = $this->urlGenerator->generateFromRoute('<current>', [], ['query' => UrlHelper::filterQueryParameters($query->all())]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment