fix crash when var_dumping packets

This commit is contained in:
Dylan K. Taylor 2017-08-03 08:45:56 +01:00
parent f0b4a33e2e
commit 8a02dbb15a

View File

@ -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);