Skip to content

Commit 835d907

Browse files
committed
fix infinite loop
1 parent 9fe079a commit 835d907

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/templates/header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use UnityWebPortal\lib\UnitySite;
44

5-
if (isset($_POST)) {
5+
if ($_SERVER["REQUEST_METHOD"] == "POST") {
66
if ((@$_SESSION["is_admin"] ?? false) == true
77
&& (@$_POST["form_name"] ?? null) == "clearView"
88
) {
@@ -14,8 +14,8 @@
1414
// They also must not redirect like standard PRG practice because this
1515
// header also needs to handle POST data. So this header does the PRG redirect
1616
// for all pages.
17-
UnitySite::redirect($_SERVER['PHP_SELF']);
1817
unset($_POST); // unset ensures that header must not come before POST handling
18+
UnitySite::redirect($_SERVER['PHP_SELF']);
1919
}
2020

2121
if (isset($SSO)) {

0 commit comments

Comments
 (0)