Skip to content

Commit

Permalink
fix nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaileke committed Aug 9, 2024
1 parent 884bbff commit b6c85e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/UnconnectedMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private function handle(OfflineMessage $packet, InternetAddress $address) : bool
$this->server->getLogger()->notice("Refused connection from $address due to incompatible RakNet protocol version (version $packet->protocol)");
}else{
$cookie = null;
if ($this->server->hasServerSecurity()) {
if ($this->server->getCookie() instanceof Cookie) {

Check failure on line 85 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Class raklib\server\Cookie not found.

Check failure on line 85 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Class raklib\server\Cookie not found.
$this->server->getCookie()->add($address);

Check failure on line 86 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Call to method add() on an unknown class raklib\server\Cookie.

Check failure on line 86 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Call to method add() on an unknown class raklib\server\Cookie.
$cookie = $this->server->getCookie()->get($address);

Check failure on line 87 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Call to method get() on an unknown class raklib\server\Cookie.

Check failure on line 87 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Call to method get() on an unknown class raklib\server\Cookie.
}
Expand All @@ -103,7 +103,7 @@ private function handle(OfflineMessage $packet, InternetAddress $address) : bool
$this->server->getLogger()->debug("Not creating session for $address due to session already opened");
return true;
}
if ($this->server->hasServerSecurity()) { // womp womp
if ($this->server->getCookie() instanceof Cookie) { // womp womp

Check failure on line 106 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Class raklib\server\Cookie not found.

Check failure on line 106 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Class raklib\server\Cookie not found.
if (!$this->server->getCookie()->check($address, $packet->cookie)) {

Check failure on line 107 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Call to method check() on an unknown class raklib\server\Cookie.

Check failure on line 107 in src/server/UnconnectedMessageHandler.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Call to method check() on an unknown class raklib\server\Cookie.
// Disconnect if OpenConnectionReply1 and the cookie in the OpenConnectionRequest2 packet do not match
$this->server->getLogger()->debug("Not creating session for $address due to session mismatched cookies");
Expand Down

0 comments on commit b6c85e7

Please sign in to comment.