Skip to content

Commit 6d5eef4

Browse files
committed
revert die
1 parent 6ff0443 commit 6d5eef4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

resources/lib/UnitySite.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@
77

88
class UnitySite
99
{
10-
public static function die()
10+
public static function die($x = null, $show_user = false)
1111
{
12-
if (CONFIG["site"]["allow_die"]) {
13-
die();
12+
if (CONFIG["site"]["allow_die"] == false) {
13+
if (is_null($x)) {
14+
throw new NoDieException();
15+
} else {
16+
throw new NoDieException($x);
17+
}
1418
} else {
15-
throw new NoDieException();
19+
if (!is_null($x) and $show_user) {
20+
die($x);
21+
} else {
22+
die();
23+
}
1624
}
1725
}
1826

0 commit comments

Comments
 (0)