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

@ -140,7 +140,7 @@ $game_options = [];
$games_dir = __DIR__ . '/../../config_games/server_configs/';
if (is_dir($games_dir)) {
$files = scandir($games_dir);
foreach ($files as $file) {
foreach ((array)$files as $file) {
if (pathinfo($file, PATHINFO_EXTENSION) === 'xml' && strpos($file, '.bak') === false) {
$game_key = str_replace('.xml', '', $file);
$game_options[] = $game_key;
@ -265,7 +265,7 @@ include(__DIR__ . '/includes/menu.php');
<div id="game_filter_list_container" class="form-group" style="display:none;">
<label>Select Games</label>
<div class="game-checkboxes">
<?php foreach ($game_options as $game): ?>
<?php foreach ((array)$game_options as $game): ?>
<label>
<input type="checkbox" name="game_filter_list[]" value="<?php echo h($game); ?>">
<?php echo h($game); ?>
@ -325,7 +325,7 @@ include(__DIR__ . '/includes/menu.php');
<?php if ($coupon['game_filter_type'] === 'all_games'): ?>
All Games
<?php else: ?>
<?php echo count($games_filtered); ?> specific games
<?php echo count((array)$games_filtered); ?> specific games
<?php endif; ?>
</td>
<td>
@ -397,7 +397,7 @@ include(__DIR__ . '/includes/menu.php');
<div class="form-group" style="display:<?php echo $coupon['game_filter_type'] === 'specific_games' ? 'block' : 'none'; ?>;">
<label>Select Games</label>
<div class="game-checkboxes">
<?php foreach ($game_options as $game): ?>
<?php foreach ((array)$game_options as $game): ?>
<label>
<input type="checkbox" name="game_filter_list[]" value="<?php echo h($game); ?>"
<?php echo in_array($game, $games_filtered) ? 'checked' : ''; ?>>