Skip to content

Commit ea37a9e

Browse files
committed
fix bug
1 parent f80a9f1 commit ea37a9e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

resources/lib/UnityHTTPD.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ public static function errorLog(
9999
$output["REMOTE_USER"] = $_SERVER["REMOTE_USER"] ?? null;
100100
$output["REMOTE_ADDR"] = $_SERVER["REMOTE_ADDR"] ?? null;
101101
$output["_REQUEST"] = $_REQUEST;
102-
if (!is_null($errorid) || !is_null($error)) {
103-
$output["errorid"] = self::errorID($error);
102+
if (is_null($errorid) && !is_null($error)) {
103+
$errorid = self::errorID($error);
104+
}
105+
if (!is_null($errorid)) {
106+
$output["errorid"] = $errorid;
104107
}
105108
error_log("$title: " . \jsonEncode($output));
106109
}

0 commit comments

Comments
 (0)