mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Barf on trying to read/write nonexisting fields of packets
this should make it easier to debug problems when content of packets changes during protocol updates.
This commit is contained in:
parent
b473ffdedc
commit
4c08a05fae
@ -134,4 +134,12 @@ abstract class DataPacket extends NetworkBinaryStream{
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function __get($name){
|
||||
throw new \Error("Cannot read non-existing field \"$name\"");
|
||||
}
|
||||
|
||||
public function __set($name, $value){
|
||||
throw new \Error("Cannot write non-existing field \"$name\"");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user