From 92e1811b06903594cfaa24b8580403aa81c8b9cc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 1 Dec 2019 20:36:56 +0000 Subject: [PATCH] DataPacket: fixed bad null assignment to buffer in clean() this is never expected to be null, so implicitly relies on PHP magic behaviour to convert it to string when appended. --- src/pocketmine/network/mcpe/protocol/DataPacket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/network/mcpe/protocol/DataPacket.php b/src/pocketmine/network/mcpe/protocol/DataPacket.php index f2e60caa5..aeeeaf054 100644 --- a/src/pocketmine/network/mcpe/protocol/DataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/DataPacket.php @@ -135,7 +135,7 @@ abstract class DataPacket extends NetworkBinaryStream{ abstract public function handle(NetworkSession $session) : bool; public function clean(){ - $this->buffer = null; + $this->buffer = ""; $this->isEncoded = false; $this->offset = 0; return $this;