Cannot use a scalar value as an array in ... on line 44
etobod opened this issue · 1 comments
Describe the bug
Hello everyone! :)
Basically, I have two errors as below:
Błąd 1: Cannot use a scalar value as an array in ... on line 44
Błąd 2: Trying to access array offset on value of type int in ... on line 45
full error line from log:
2023/05/19 21:40:27 [error] 29071#29071: *112960 FastCGI sent in stderr: "s3-banner.php on line 45PHP message: PHP Warning: Cannot use a scalar value as an array in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 44PHP message: PHP Notice: Trying to access array offset on value of type int in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: Cannot use a scalar value as an array in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 44PHP message: PHP Notice: Trying to access array offset on value of type int in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: Cannot use a scalar value as an array in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 44PHP message: PHP Notice: Trying to access array offset on value of type int in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: Cannot use a scalar value as an array in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 44PHP message: PHP Notice: Trying to access array offset on value of type int in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.php on line 45PHP message: PHP Warning: Cannot use a scalar value as an array in /var/www/status.xxx.pl/public_html/ts3-banner/ts3-banner.p
To Reproduce
Steps to reproduce the behavior:
The error appears if it's opened by the TeamSpeak client. To open it via Firefox it works without issues
Expected behavior
Has anyone had the same problem? Any thoughts or suggestions?
Desktop (please complete the following information):
- OS: Windows 11
- Browser Firefox
- Version 113.0.1
- TeamSpeak 3.5.6
Server (please complete the following information):
- OS: Debian
- Version 9
- PHP 7.4
Hey @etobod
It looks like you are using the experimental version. Did you tried to use the newest version? https://github.com/dennisabrams/teamspeak3-banner/releases/tag/v1.0.5