mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
InGamePacketHandler: fixed crash in form handling when invalid JSON is given
This commit is contained in:
parent
061d851fbd
commit
56fe71d939
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user