diff --git a/includes/functions.php b/includes/functions.php index bd374ceb..bd88b272 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -630,6 +630,7 @@ function get_game_selector($os, $game_cfgs, $home_cfg_id = FALSE) } function getClientIPAddress(){ + $ip = null; if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP'])){ $ip = $_SERVER['HTTP_CF_CONNECTING_IP']; }else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ @@ -638,7 +639,7 @@ function getClientIPAddress(){ $ip = $_SERVER['HTTP_X_REAL_IP']; } - if(filter_var($ip, FILTER_VALIDATE_IP)){ + if(isset($ip) && filter_var($ip, FILTER_VALIDATE_IP)){ return $ip; } diff --git a/includes/lib_remote.php b/includes/lib_remote.php index 6b38b752..111dcbf6 100644 --- a/includes/lib_remote.php +++ b/includes/lib_remote.php @@ -869,6 +869,7 @@ class OGPRemoteLibrary if ( $retval > 0 ) { + $data_tmp = is_string($data_tmp) ? $data_tmp : ''; $lines = explode('\n',$data_tmp); foreach ((array)$lines as $line) { diff --git a/modules/cron/user_cron.php b/modules/cron/user_cron.php index 0744b088..0e4c6cab 100644 --- a/modules/cron/user_cron.php +++ b/modules/cron/user_cron.php @@ -80,16 +80,16 @@ function exec_ogp_module() switch ($_POST['action']) { case "stop": - $command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1"; + $command = "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/stop&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1"; break; case "start": - $command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1"; + $command = "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/start&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1"; break; case "restart": - $command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1"; + $command = "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/restart&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}\" --no-check-certificate > /dev/null 2>&1"; break; case "steam_auto_update": - $command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1"; + $command = "wget -qO- \"{$panelURL}/ogp_api.php?gamemanager/update&token={$token}&ip={$ip}&port={$port}&mod_key={$mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1"; break; } diff --git a/modules/dashboard/dashboard.php b/modules/dashboard/dashboard.php index 7665b3bd..564a7e3a 100644 --- a/modules/dashboard/dashboard.php +++ b/modules/dashboard/dashboard.php @@ -57,7 +57,7 @@ function exec_ogp_module() require_once("includes/refreshed.php"); $refresh = new refreshed(); - $OnlineServers .= "
Recent updates and changes
"; + $OnlineServers = "Recent updates and changes
"; ?>