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
|
|
@ -27,6 +27,9 @@ function do_progress($kbytes,$rsyncPath)
|
|||
$mbytes = round($kbytes / 1024, 2);
|
||||
|
||||
$sizes = file("modules/gamemanager/sizes.list", FILE_IGNORE_NEW_LINES)or print_failure("Can't open sizes.list");
|
||||
if (!is_array($sizes)) {
|
||||
$sizes = [];
|
||||
}
|
||||
|
||||
# Adds a backslash on each slash so it can be used as patern at preg_match
|
||||
$rsyncPath = addcslashes($rsyncPath,"/");
|
||||
|
|
@ -365,7 +368,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
}
|
||||
$master_server_home_id = $db->getMasterServer( $home_info['remote_server_id'], $home_info['home_cfg_id'] );
|
||||
if ( in_array($rs_gname, $sync_list) )
|
||||
if ( is_array($sync_list) && in_array($rs_gname, $sync_list) )
|
||||
{
|
||||
echo "<form action='?m=gamemanager&p=rsync_install' method='post'>
|
||||
<table class='center'>
|
||||
|
|
@ -412,4 +415,3 @@ function exec_ogp_module() {
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue