menu
#72 fclose(): Argument #1 ($stream) must be of type resource, bool given

Submitted by PocketMine-MP 5.9.1+dev.2014

General information

Version: 5.9.1+dev.2014
Git commit: cfe6b1e4
Plugin involvement: Direct
Report date: 2024-03-05 18:37:01 +0000 UTC
Server uptime: 15 days 3 hours 5 minutes 16 seconds

System Information

PHP version: 8.2.9
JIT status: Not available
Operating system: linux
System banner: Linux anmine.ru 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64

Error information

Warning: the Hub plugin was directly involved in this crash. Please contact the plugin author.
Thread: AsyncWorker#0
Message: fclose(): Argument #1 ($stream) must be of type resource, bool given
File: plugins/Hub.phar/src/corndan/Hub/classes/QueryClass
Line: #20
Type: TypeError
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
private $status = false;
private $errors = [];
private $info = NULL;

public function __construct(string $host, int $port, int $timeout = 4)
{
$socket = @fsockopen('udp://' . $host, $port, $errno, $errstr, $timeout);
if ($errno || $socket === false) {
fclose($socket);
$this->errors[] = $errno;
$this->errors[] = $errstr;
return;
}
stream_Set_Timeout($socket, $timeout);
stream_Set_Blocking($socket, true);

$OFFLINE_MESSAGE_DATA_ID = pack('c*', 0x00, 0xFF, 0xFF, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0x12, 0x34, 0x56, 0x78);
$command = pack('cQ', 0x01, time()); // DefaultMessageIDTypes::ID_UNCONNECTED_PING + 64bit current time
$command .= $OFFLINE_MESSAGE_DATA_ID;
#0 /home/anmine/servers/hub/plugins/Hub.phar/src/corndan/Hub/classes/QueryClass(20): fclose(false)
#1 /home/anmine/servers/hub/plugins/Hub.phar/src/corndan/Hub/HubMain(105): corndan\Hub\classes\QueryClass->__construct(string[13] ananasmine.ru, int 19135)
#2 pmsrc/src/scheduler/AsyncTask(83): pocketmine\scheduler\AsyncTask@anonymous�phar:///home/anmine/servers/hub/plugins/Hub.phar/src/corndan/Hub/HubMain.php:95$24a->onRun()
#3 (): pocketmine\scheduler\AsyncTask->run()

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show