File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2020require_once __DIR__ . "/lib/UnityWebhook.php " ;
2121require_once __DIR__ . "/lib/UnityRedis.php " ;
2222require_once __DIR__ . "/lib/UnityGithub.php " ;
23+ require_once __DIR__ . "/lib/exceptions/RedirectException.php " ;
2324
2425// run init script
2526require __DIR__ . "/init.php " ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static function redirect($destination)
1010 {
1111 if ($ _SERVER ["PHP_SELF " ] != $ destination ) {
1212 header ("Location: $ destination " );
13- die ("Redirect failed, click <a href=' $ destination'>here</a> to continue. " );
13+ throw new RedirectException ("Redirect failed, click <a href=' $ destination'>here</a> to continue. " );
1414 }
1515 }
1616
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace UnityWebPortal \lib ;
4+
5+ class RedirectException extends \Exception
6+ {
7+ }
Original file line number Diff line number Diff line change 1414require_once __DIR__ . "/../resources/lib/UnityWebhook.php " ;
1515require_once __DIR__ . "/../resources/lib/UnityRedis.php " ;
1616require_once __DIR__ . "/../resources/lib/UnityGithub.php " ;
17+ require_once __DIR__ . "/../resources/lib/exceptions/RedirectException.php " ;
1718
1819global $ HTTP_HEADER_TEST_INPUTS ;
1920$ HTTP_HEADER_TEST_INPUTS = [
You can’t perform that action at this time.
0 commit comments