dennisabrams / teamspeak-banner

Fully customizable, dynamic and responsive TeamSpeak 3 🔊 banner with server and client information.
https://github.com/dennisabrams/teamspeak-banner
MIT License
27 stars 3 forks source link

Cannot use a scalar value as an array in ... on line 44 #12

Open etobod opened 1 year ago

etobod commented 1 year ago

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):

Server (please complete the following information):

dennisabrams commented 1 year ago

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