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:
parent
54e7f07aa0
commit
4d1b87b697
3 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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") . ':
|
||||
|
|
|
|||
|
|
@ -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>";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue