From a4e089dd8c0da4e78a16aaf8b4278a407f37f895 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Mon, 29 Sep 2025 13:30:51 -0700 Subject: [PATCH] Ok actual fix --- database/getChatroomMessages.php | 2 +- database/getTopPlayers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/getChatroomMessages.php b/database/getChatroomMessages.php index 7900eb4..3f614ab 100644 --- a/database/getChatroomMessages.php +++ b/database/getChatroomMessages.php @@ -60,7 +60,7 @@ foreach ($rows as $row) { if (getClientVersion() == "1.6") { echo encrypt(json_encode($mapped)); } else { - echo encrypt(json_encode(["messages" => array_reverse($mapped), "customIcons" => $icons])); + echo encrypt(json_encode(["messages" => array_reverse($mapped), "customIcons" => $icons == [] ? new stdClass() : $icons])); } $conn->close(); \ No newline at end of file diff --git a/database/getTopPlayers.php b/database/getTopPlayers.php index 8b3f908..0dba29c 100644 --- a/database/getTopPlayers.php +++ b/database/getTopPlayers.php @@ -91,7 +91,7 @@ $limited = array_slice($mapped, 0, 500); if (getClientVersion() == "1.6" || (getClientVersion() == "1.6.1" && $request_type == "1")) { echo encrypt(json_encode($limited)); } else { - echo encrypt(json_encode(["entries" => $limited, "customIcons" => $icons])); + echo encrypt(json_encode(["entries" => $limited, "customIcons" => $icons == [] ? new stdClass() : $icons])); } $conn->close(); \ No newline at end of file