Skip to content

Commit a2e3fb3

Browse files
committed
initialize messages
1 parent adff0c8 commit a2e3fb3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

resources/init.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
$WEBHOOK = new UnityWebhook();
3535
$GITHUB = new UnityGithub();
3636

37+
$_SESSION["messages"] = [];
38+
3739
if (isset($_SERVER["REMOTE_USER"])) {
3840
// Check if SSO is enabled on this page
3941
$SSO = UnitySSO::getSSO();

resources/lib/UnityHTTPD.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ public static function alert(string $message): void
207207

208208
public static function message(string $title, string $body, UnityHTTPDMessageSeverity $severity)
209209
{
210-
if (!array_key_exists("messages", $_SESSION)) {
211-
$_SESSION["messages"] = [];
212-
}
213210
array_push($_SESSION["messages"], [$title, $body, $severity]);
214211
}
215212

0 commit comments

Comments
 (0)