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

@ -20,7 +20,7 @@ function topRow(){
function bottomRow($latestDay,$backupPaths){
echo '<br><div>';
$latest = customSearch($latestDay,$backupPaths);
$length = count($backupPaths);
$length = count((array)$backupPaths);
for ($i = 0; $i < $length; $i++) {
$path = explode("/",$backupPaths[$i]);
$path1 = explode("-",$path[4]);
@ -106,7 +106,7 @@ function backupNow($homeid){
echo '</form>';
echo '<div>';
echo '<textarea readonly id="backup" name="backup" rows="20" cols="30">';
foreach ($output as $line) { echo $line."\n";}
foreach ((array)$output as $line) { echo $line."\n";}
echo '</textarea>';
echo '</div></div></center>';
@ -175,7 +175,7 @@ function restoreNow($homeid, $action){
echo '</form>';
echo '<div>';
echo '<textarea readonly id="backup" name="backup" rows="20" cols="30">';
foreach ($output as $line) { echo $line."\n";}
foreach ((array)$output as $line) { echo $line."\n";}
echo '</textarea>';
echo "</div>";
echo "</div></center>";
@ -217,7 +217,7 @@ function serverINFO($serverid) { // returns serverINFO Array
return $serverINFO;
}
function customSearch($keyword, $arrayToSearch){
foreach($arrayToSearch as $key => $arrayItem){
foreach ((array)$arrayToSearch as $key => $arrayItem){
if( stristr($arrayItem, $keyword)){
return $key;
}