mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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) . "]";
|
$fixed = "[" . implode(",", $newParts) . "]";
|
||||||
if(($ret = json_decode($fixed, $assoc)) === null){
|
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;
|
return $ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user