Skip to content

Commit

Permalink
Session: workaround PHPStan type specifying bug
Browse files Browse the repository at this point in the history
I don't like to workaround stuff like this, but it allows it to better find other bugs, while also taking 30 false positives off the table.
  • Loading branch information
dktapps committed Aug 28, 2020
1 parent 6e4b5b2 commit 5f2a020
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,10 @@ private function handleEncapsulatedPacket(EncapsulatedPacket $packet) : void{
}
}

if($packet->hasSplit and ($packet = $this->handleSplit($packet)) === null){
return;
if($packet->hasSplit){
if(($packet = $this->handleSplit($packet)) === null){
return;
}
}

if(PacketReliability::isSequencedOrOrdered($packet->reliability) and ($packet->orderChannel < 0 or $packet->orderChannel >= self::CHANNEL_COUNT)){
Expand Down

0 comments on commit 5f2a020

Please sign in to comment.