Я получаю следующую ошибку
[Wed Apr 22 17:45:49.961558 2020] [php7:warn] [pid 3585] [client ***.***.**.***:25994] PHP Warning: unpack(): Type C: not enough input, need 1, have 0 in /var/www/html/tcp/assets/php/WebsenderAPI.php on line 84, referer: https://*************.de/tcp/motd.php
[Wed Apr 22 17:45:49.961714 2020] [php7:notice] [pid 3585] [client ***.***.**.***:25994] PHP Notice: Trying to access array offset on value of type bool in /var/www/html/tcp/assets/php/WebsenderAPI.php on line 85, referer: https://***********.de/tcp/motd.php
Код:
private function readRawByte(){
$up = unpack("Ci", fread($this->socket, 1)); // Line 84
$b = $up["i"]; // Line 85
if($b > 127)
$b -= 256;
return $b;
}
Спасибо за помощь