could we get this substr call edited to stop the depreciation errors for php8.1?
public function read($bytes)
{
$data = substr($this->str, $this->pos ?? 0, $bytes);
$this->seekto($this->pos + $bytes);
return $data;
}
Or maybe just set it on construct?
public function __construct($str)
{
$this->str = $str;
$this->strlen = strlen($this->str);
$this->pos = 0;
}
The errors for translations on php8.1 are insanely loud when translating on php8.1
[Error] substr(): Passing null to parameter #2 ($offset) of type int is deprecated in file /var/www/music/vendor/gettext/gettext/src/Utils/StringReader.php(31)
I will be looking at moving to gettext5 but i don't really understand the code enough yet to do this for ampache
https://github.com/php-gettext/Gettext/blob/3f7bc5ef23302a9059e64934f3d59e454516bec0/src/Utils/StringReader.php#L31
could we get this substr call edited to stop the depreciation errors for php8.1?
Or maybe just set it on construct?
The errors for translations on php8.1 are insanely loud when translating on php8.1
I will be looking at moving to gettext5 but i don't really understand the code enough yet to do this for ampache