LoginPacket: protocol cannot be NULL

This commit is contained in:
Dylan K. Taylor
2020-08-04 16:55:47 +01:00
parent 0766952f39
commit 8da7e789fd
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ class LoginPacket extends DataPacket{
}
public function mayHaveUnreadBytes() : bool{
return $this->protocol !== null and $this->protocol !== ProtocolInfo::CURRENT_PROTOCOL;
return $this->protocol !== ProtocolInfo::CURRENT_PROTOCOL;
}
protected function decodePayload(){
@ -92,7 +92,7 @@ class LoginPacket extends DataPacket{
}
$logger = MainLogger::getLogger();
$logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version " . ($this->protocol ?? "unknown") . "): " . $e->getMessage());
$logger->debug(get_class($e) . " was thrown while decoding connection request in login (protocol version $this->protocol): " . $e->getMessage());
foreach(Utils::printableTrace($e->getTrace()) as $line){
$logger->debug($line);
}