From 56fe71d939c38fe14e18a31a673a9331bcc0e4ca Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 21 Jan 2022 17:34:13 +0000 Subject: [PATCH] InGamePacketHandler: fixed crash in form handling when invalid JSON is given --- src/network/mcpe/handler/InGamePacketHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index 947e29042..045c8a5ed 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -880,7 +880,7 @@ class InGamePacketHandler extends PacketHandler{ $fixed = "[" . implode(",", $newParts) . "]"; if(($ret = json_decode($fixed, $assoc)) === null){ - throw new \InvalidArgumentException("Failed to fix JSON: " . json_last_error_msg() . "(original: $json, modified: $fixed)"); + throw new PacketHandlingException("Failed to fix JSON: " . json_last_error_msg() . "(original: $json, modified: $fixed)"); } return $ret;