We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8088ac2 commit ffc73afCopy full SHA for ffc73af
resources/lib/UnitySite.php
@@ -2,6 +2,7 @@
2
3
namespace UnityWebPortal\lib;
4
5
+use \UnityWebPortal\lib\exceptions\RedirectException;
6
use phpseclib3\Crypt\PublicKeyLoader;
7
8
class UnitySite
@@ -10,7 +11,9 @@ public static function redirect($destination)
10
11
{
12
if ($_SERVER["PHP_SELF"] != $destination) {
13
header("Location: $destination");
- die("Redirect failed, click <a href='$destination'>here</a> to continue.");
14
+ // kill current PHP process, user's browser will start a new one when they HTTP GET $destination
15
+ echo "Redirect failed, click <a href='$destination'>here</a> to continue.";
16
+ throw new RedirectException($destination);
17
}
18
19
0 commit comments