[PLUGIN][Favourite][Repeat] Fix incorrect use of RedirectException

This commit is contained in:
2021-12-26 05:59:22 +00:00
parent 91f8c86efa
commit 625618b4e0
2 changed files with 4 additions and 4 deletions

View File

@@ -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) throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive)
} else { } else {
// TODO anchor on element id // TODO anchor on element id
throw new RedirectException($from); throw new RedirectException(url: $from);
} }
} else { } else {
// If we don't have a URL to return to, go to the instance root // 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) throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive)
} else { } else {
// TODO anchor on element id // TODO anchor on element id
throw new RedirectException($from); throw new RedirectException(url: $from);
} }
} else { } else {
// If we don't have a URL to return to, go to the instance root // If we don't have a URL to return to, go to the instance root

View File

@@ -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) throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive)
} else { } else {
// TODO anchor on element id // TODO anchor on element id
throw new RedirectException($from); throw new RedirectException(url: $from);
} }
} else { } else {
// If we don't have a URL to return to, go to the instance root // 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) throw new ClientException(_m('Can not redirect to outside the website from here'), 400); // 400 Bad request (deceptive)
} else { } else {
// TODO anchor on element id // TODO anchor on element id
throw new RedirectException($from); throw new RedirectException(url: $from);
} }
} else { } else {
// If we don't have a URL to return to, go to the instance root // If we don't have a URL to return to, go to the instance root