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

This commit is contained in:
Diogo Peralta Cordeiro 2021-12-26 05:59:22 +00:00
parent 91f8c86efa
commit 625618b4e0
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
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)
} 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

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)
} 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