Apply automated PHP8 safety transforms

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-23 14:01:37 +00:00 committed by GitHub
parent aca850b6cd
commit e44519c030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
465 changed files with 1716 additions and 1716 deletions

View file

@ -181,7 +181,7 @@ class Teamspeak3 extends Protocol
$result = new Result();
// Iterate over the sections and offload the parsing
foreach ($sections as $section) {
foreach ((array)$sections as $section) {
// Grab a snip of the data so we can figure out what it is
$check = substr(trim($section), 0, 4);
@ -226,7 +226,7 @@ class Teamspeak3 extends Protocol
$items = explode(' ', $data);
// Iterate over the items
foreach ($items as $item) {
foreach ((array)$items as $item) {
// Explode and make sure we always have 2 items in the array
list($key, $value) = array_pad(explode('=', $item, 2), 2, '');
@ -261,7 +261,7 @@ class Teamspeak3 extends Protocol
$result->add('dedicated', 1);
// Iterate over the properties
foreach ($properties as $key => $value) {
foreach ((array)$properties as $key => $value) {
$result->add($key, $value);
}
@ -287,12 +287,12 @@ class Teamspeak3 extends Protocol
$channels = explode('|', $data);
// Iterate over the channels
foreach ($channels as $channel) {
foreach ((array)$channels as $channel) {
// Offload the parsing for these values
$properties = $this->processProperties($channel);
// Iterate over the properties
foreach ($properties as $key => $value) {
foreach ((array)$properties as $key => $value) {
$result->addTeam($key, $value);
}
}
@ -313,12 +313,12 @@ class Teamspeak3 extends Protocol
$players = explode('|', $data);
// Iterate over the channels
foreach ($players as $player) {
foreach ((array)$players as $player) {
// Offload the parsing for these values
$properties = $this->processProperties($player);
// Iterate over the properties
foreach ($properties as $key => $value) {
foreach ((array)$properties as $key => $value) {
$result->addPlayer($key, $value);
}
}