From 625618b4e0c9a1ba9794a61abf4f1b493a8a02dc Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Sun, 26 Dec 2021 05:59:22 +0000 Subject: [PATCH] [PLUGIN][Favourite][Repeat] Fix incorrect use of RedirectException --- plugins/Favourite/Controller/Favourite.php | 4 ++-- plugins/RepeatNote/Controller/Repeat.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Favourite/Controller/Favourite.php b/plugins/Favourite/Controller/Favourite.php index f9aa39c8b8..ef23ee0d35 100644 --- a/plugins/Favourite/Controller/Favourite.php +++ b/plugins/Favourite/Controller/Favourite.php @@ -86,7 +86,7 @@ class Favourite extends FeedController throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive) } else { // TODO anchor on element id - throw new RedirectException($from); + throw new RedirectException(url: $from); } } else { // If we don't have a URL to return to, go to the instance root @@ -145,7 +145,7 @@ class Favourite extends FeedController throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive) } else { // TODO anchor on element id - throw new RedirectException($from); + throw new RedirectException(url: $from); } } else { // If we don't have a URL to return to, go to the instance root diff --git a/plugins/RepeatNote/Controller/Repeat.php b/plugins/RepeatNote/Controller/Repeat.php index ef7a840ec5..43e8b58901 100644 --- a/plugins/RepeatNote/Controller/Repeat.php +++ b/plugins/RepeatNote/Controller/Repeat.php @@ -81,7 +81,7 @@ class Repeat extends Controller throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive) } else { // TODO anchor on element id - throw new RedirectException($from); + throw new RedirectException(url: $from); } } else { // If we don't have a URL to return to, go to the instance root @@ -136,7 +136,7 @@ class Repeat extends Controller throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive) } else { // TODO anchor on element id - throw new RedirectException($from); + throw new RedirectException(url: $from); } } else { // If we don't have a URL to return to, go to the instance root