From 8a02dbb15a1a291b83a672e383562c26c3df125f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 3 Aug 2017 08:45:56 +0100 Subject: [PATCH] fix crash when var_dumping packets --- 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 d7ec82b6c..dd70a4e90 100644 --- a/src/pocketmine/network/mcpe/protocol/DataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/DataPacket.php @@ -107,7 +107,7 @@ abstract class DataPacket extends BinaryStream{ public function __debugInfo(){ $data = []; foreach($this as $k => $v){ - if($k === "buffer"){ + if($k === "buffer" and is_string($v)){ $data[$k] = bin2hex($v); }elseif(is_string($v) or (is_object($v) and method_exists($v, "__toString"))){ $data[$k] = Utils::printable((string) $v);