php 8.1 fixs

This commit is contained in:
ArkQuark 2023-03-25 18:37:40 +03:00
parent 10c126b4d5
commit 9abba9a2a2
13 changed files with 90 additions and 11 deletions

View file

@ -6,12 +6,12 @@ class RakNetCodec{
public function __construct(RakNetPacket $packet){
$this->packet = $packet;
$this->buffer =& $this->packet->buffer;
$this->buffer = &$this->packet->buffer;
$this->encode();
}
private function encode(){
if(strlen($this->packet->buffer) > 0){
if($this->packet->buffer != null && strlen($this->packet->buffer) > 0){
return;
}
$this->buffer .= chr($this->packet->pid());

View file

@ -139,7 +139,7 @@ abstract class RakNetDataPacket extends stdClass{
}
protected function putByte($v){
$this->buffer .= chr($v);
$this->buffer .= chr((int)$v);
}
protected function getString(){