mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +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(){
|
public function __debugInfo(){
|
||||||
$data = [];
|
$data = [];
|
||||||
foreach((array) $this as $k => $v){
|
foreach((array) $this as $k => $v){
|
||||||
if($k === "buffer" and is_string($v)){
|
if($v === $this->getBuffer()){
|
||||||
$data[$k] = bin2hex($v);
|
$data[$k] = bin2hex($v);
|
||||||
}elseif(is_string($v) or (is_object($v) and method_exists($v, "__toString"))){
|
}elseif(is_string($v) or (is_object($v) and method_exists($v, "__toString"))){
|
||||||
$data[$k] = Utils::printable((string) $v);
|
$data[$k] = Utils::printable((string) $v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user