Adjust array-count guards after validation feedback

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/88949fe0-8891-483a-b5c5-952bc209748d

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-20 12:41:55 +00:00 committed by GitHub
parent 54e7f07aa0
commit 4d1b87b697
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -358,7 +358,7 @@ function exec_ogp_module() {
foreach($groups as $group)
$group_names[$group['group_id']] = $group['group_name'];
if (isset($result) and is_array($result) and $result > 0)
if (isset($result) and is_array($result) and (is_array($result) ? count($result) : 0) > 0)
{
foreach($result as $row)
{

View file

@ -88,7 +88,7 @@ elseif(isset($_POST['base64_command']))
}
$presets = $db->getRconPresets($home_info['home_cfg_id'],$home_info['mods'][$mod_id]['mod_cfg_id']);
if(is_array($presets) && $presets > 0)
if(is_array($presets) && (is_array($presets) ? count($presets) : 0) > 0)
{
echo '<form action="" method="post">'.
get_lang("rcon_presets") . ':

View file

@ -106,7 +106,7 @@ function exec_ogp_module() {
<br>
<?php
$presets = $db->getRconPresets($home_cfg_id,$mod_cfg_id);
if(is_array($presets) && $presets > 0)
if(is_array($presets) && (is_array($presets) ? count($presets) : 0) > 0)
{
echo "<h2>".get_lang("edit_presets")."</h2>";