mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
DataPacket: fixed var_dump() buffer bin2hex not working
in BinaryUtils new versions, BinaryStream->buffer is private. detected by phpstan level 4
This commit is contained in:
parent
9a31cbf5ef
commit
6ace4733ce
@ -107,7 +107,7 @@ abstract class DataPacket extends NetworkBinaryStream implements Packet{
|
||||
public function __debugInfo(){
|
||||
$data = [];
|
||||
foreach((array) $this as $k => $v){
|
||||
if($k === "buffer" and is_string($v)){
|
||||
if($v === $this->getBuffer()){
|
||||
$data[$k] = bin2hex($v);
|
||||
}elseif(is_string($v) or (is_object($v) and method_exists($v, "__toString"))){
|
||||
$data[$k] = Utils::printable((string) $v);
|
||||
|
Loading…
x
Reference in New Issue
Block a user