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:
parent
aca850b6cd
commit
e44519c030
465 changed files with 1716 additions and 1716 deletions
|
|
@ -49,7 +49,7 @@ function exec_ogp_module()
|
|||
$hosts_list = file_get_contents($hosts_file);
|
||||
$hosts = preg_split("/[\r\n]+/", $hosts_list);
|
||||
$new_hosts = array();
|
||||
foreach($hosts as $host)
|
||||
foreach ((array)$hosts as $host)
|
||||
{
|
||||
$host = trim($host);
|
||||
if($host == '')
|
||||
|
|
@ -82,7 +82,7 @@ function exec_ogp_module()
|
|||
$hosts_list = file_get_contents($hosts_file);
|
||||
$hosts = preg_split("/[\r\n]+/", $hosts_list);
|
||||
|
||||
foreach($hosts as $host)
|
||||
foreach ((array)$hosts as $host)
|
||||
{
|
||||
$host = trim($host);
|
||||
if($host == '' or in_array($host, $new_hosts))
|
||||
|
|
@ -127,7 +127,7 @@ function exec_ogp_module()
|
|||
$authorized_hosts[] = $ip;
|
||||
|
||||
$remote_servers = $db->getRemoteServers();
|
||||
foreach($remote_servers as $remote_server)
|
||||
foreach ((array)$remote_servers as $remote_server)
|
||||
{
|
||||
$ip = getHostByName($remote_server['agent_ip']);
|
||||
if(filter_var($ip, FILTER_VALIDATE_IP))
|
||||
|
|
@ -136,7 +136,7 @@ function exec_ogp_module()
|
|||
}
|
||||
|
||||
echo "<h4>".get_lang('default_trusted_hosts')."</h4>\n<br>\n<div align='center'>\n";
|
||||
foreach($authorized_hosts as $authorized_host)
|
||||
foreach ((array)$authorized_hosts as $authorized_host)
|
||||
{
|
||||
echo $authorized_host."<br>\n";
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ function exec_ogp_module()
|
|||
$hosts = array_filter($hosts);
|
||||
if(!empty($hosts))
|
||||
{
|
||||
foreach($hosts as $host)
|
||||
foreach ((array)$hosts as $host)
|
||||
{
|
||||
$host = trim($host);
|
||||
if($host == '')
|
||||
|
|
@ -176,7 +176,7 @@ function exec_ogp_module()
|
|||
$fwd_hosts = array_filter($fwd_hosts);
|
||||
if(!empty($fwd_hosts))
|
||||
{
|
||||
foreach($fwd_hosts as $fwd_host)
|
||||
foreach ((array)$fwd_hosts as $fwd_host)
|
||||
{
|
||||
$fwd_host = trim($fwd_host);
|
||||
if($fwd_host == '')
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function get_theme_html_str( $selected, $add_empty = FALSE )
|
|||
{
|
||||
$retval .= "<option value='' selected=selected >-</option>";
|
||||
}
|
||||
foreach ( $themes as $theme )
|
||||
foreach ((array)$themes as $theme)
|
||||
{
|
||||
$retval .= "<option value='$theme'";
|
||||
if ( $theme === $selected )
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function exec_ogp_module()
|
|||
|
||||
$db->setSettings($settings);
|
||||
|
||||
if(array_key_exists("reset_game_server_order", $_REQUEST) && $_REQUEST["reset_game_server_order"] == 1){
|
||||
if(array_key_exists("reset_game_server_order", (array)$_REQUEST) && $_REQUEST["reset_game_server_order"] == 1){
|
||||
$db->resetGameServerOrder();
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ function exec_ogp_module()
|
|||
|
||||
$login_attempts_before_banned = (isset($row['login_attempts_before_banned']) and $row['login_attempts_before_banned'] != "" and is_numeric($row['login_attempts_before_banned']))? $row['login_attempts_before_banned'] : "6";
|
||||
$ft->add_field('string','login_attempts_before_banned',$login_attempts_before_banned);
|
||||
$ft->add_field('string','login_ban_time', array_key_exists("login_ban_time", $row) && !empty($row["login_ban_time"]) && is_numeric($row["login_ban_time"]) ? $row["login_ban_time"] : '');
|
||||
$ft->add_field('string','login_ban_time', array_key_exists("login_ban_time", (array)$row) && !empty($row["login_ban_time"]) && is_numeric($row["login_ban_time"]) ? $row["login_ban_time"] : '');
|
||||
|
||||
$ft->add_field('string','custom_github_update_username',@$row['custom_github_update_username']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue