From 0df3b00de4779bbe468e14a1f9f4ff5ab89fc1e2 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 23 Oct 2017 19:44:19 +0100 Subject: [PATCH] Fixed incompatible protocol message showing an empty pair of brackets when protocol is null this happens if an exception occurs while or before trying to read the protocol version --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 4926ae3cb..336e23aa8 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1965,7 +1965,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } //This pocketmine disconnect message will only be seen by the console (PlayStatusPacket causes the messages to be shown for the client) - $this->close("", $this->server->getLanguage()->translateString("pocketmine.disconnect.incompatibleProtocol", [$packet->protocol]), false); + $this->close("", $this->server->getLanguage()->translateString("pocketmine.disconnect.incompatibleProtocol", [$packet->protocol ?? "unknown"]), false); return true; }