Skip to content

Commit 07bb510

Browse files
committed
fix
1 parent b1c8409 commit 07bb510

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PingPreOld17.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ protected function getStatus(): void
5353
$data = \substr($data, 3); // Strip packet header (kick message packet and short length)
5454
$data = \iconv('UTF-16BE', 'UTF-8', $data);
5555

56+
if ($data === false)
57+
throw new ReceiveStatusException('Failed to receive status.');
58+
5659
// Are we dealing with Minecraft 1.4+ server?
5760
if($data[1] === "\xA7" && $data[2] === "\x31") {
5861
$data = \explode( "\x00", $data);

0 commit comments

Comments
 (0)