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

@ -667,7 +667,7 @@ class Ventrilo extends Protocol
$playerFields = 7;
// Iterate over the lines
foreach ($lines as $line) {
foreach ((array)$lines as $line) {
// Trim all the outlying space
$line = trim($line);
@ -754,7 +754,7 @@ class Ventrilo extends Protocol
// This will be returned
$decrypted = [];
foreach ($packets as $packet) {
foreach ((array)$packets as $packet) {
# Header :
$header = substr($packet, 0, 20);
@ -775,7 +775,7 @@ class Ventrilo extends Protocol
$table = $this->head_encrypt_table;
$characterCount = count($chars);
$characterCount = count((array)$chars);
$key = 0;
for ($i = 1; $i <= $characterCount; $i++) {
@ -801,7 +801,7 @@ class Ventrilo extends Protocol
], $header_items);
// Check to make sure the number of packets match
if ($header_items['totpck'] != count($packets)) {
if ($header_items['totpck'] != count((array)$packets)) {
throw new Exception(__METHOD__ . ": Too few packets received");
}
@ -816,7 +816,7 @@ class Ventrilo extends Protocol
$chars = unpack("C*", substr($packet, 20));
$data = "";
$characterCount = count($chars);
$characterCount = count((array)$chars);
for ($i = 1; $i <= $characterCount; $i++) {
$chars[$i] -= ($table[$a2] + (($i - 1) % 72)) & 0xFF;
@ -845,7 +845,7 @@ class Ventrilo extends Protocol
$items = explode(",", $data, $fieldCount);
// Iterate over the items for this channel
foreach ($items as $item) {
foreach ((array)$items as $item) {
// Split the key=value pair
list($key, $value) = explode("=", $item, 2);
@ -867,7 +867,7 @@ class Ventrilo extends Protocol
$items = explode(",", $data, $fieldCount);
// Iterate over the items for this player
foreach ($items as $item) {
foreach ((array)$items as $item) {
// Split the key=value pair
list($key, $value) = explode("=", $item, 2);