Add PHP 8 array guards in gamemanager and addonsmanager modules
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
5b80f144e4
commit
54e7f07aa0
13 changed files with 141 additions and 63 deletions
|
|
@ -87,7 +87,7 @@ if (preg_match("/u/",$server_home['access_rights']))
|
|||
{
|
||||
$sync_name = $server_xml->game_key;
|
||||
$sync_list = @file("modules/gamemanager/rsync.list", FILE_IGNORE_NEW_LINES);
|
||||
if ( in_array($sync_name, $sync_list) OR ($master_server_home_id != FALSE and $master_server_home_id != $server_home['home_id']) )
|
||||
if ( (is_array($sync_list) && in_array($sync_name, $sync_list)) OR ($master_server_home_id != FALSE and $master_server_home_id != $server_home['home_id']) )
|
||||
{
|
||||
$module_buttons[] = "<a class='monitorbutton' href='?m=gamemanager&p=rsync_install&home_id=".$server_home['home_id']."&mod_id=".$server_home['mod_id']."&update=update'>
|
||||
<img src='" . check_theme_image("images/rsync.png") . "' title='". rsync_install ."'>
|
||||
|
|
@ -117,4 +117,3 @@ if($_SESSION['users_role'] == "admin")
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue