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
|
|
@ -41,7 +41,7 @@ function exec_ogp_module()
|
|||
if(!empty($_POST['gameserver_id']) && !empty($_POST['remote_server_id']) && !empty($_POST['gameserver_name'])
|
||||
&& !empty($_POST['gameserver_ip']) && !empty($_POST['gameserver_port']) && !empty($_POST['addSteamid']) && !empty($_POST['sourcemod_perms'])){
|
||||
|
||||
foreach($servers as $server){
|
||||
foreach ((array)$servers as $server){
|
||||
// Try to check if hidden form values have been manually edited. If not, process.
|
||||
if($server['remote_server_id'] == $_POST['remote_server_id'] && $server['home_id'] == $_POST['gameserver_id']
|
||||
&& $server['game_name'] == $_POST['gameserver_name'] && $server['ip'] == $_POST['gameserver_ip'] && $server['port'] == $_POST['gameserver_port']){
|
||||
|
|
@ -129,7 +129,7 @@ function exec_ogp_module()
|
|||
}
|
||||
}else{
|
||||
$return = array();
|
||||
for($x = 0; $x < count($servers); ++$x){
|
||||
for($x = 0; $x < count((array)$servers); ++$x){
|
||||
$return[] = array(
|
||||
'remote_server_id' => $servers[$x]['remote_server_id'],
|
||||
'ip' => $servers[$x]['ip'],
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function exec_ogp_module()
|
|||
$servers = array();
|
||||
|
||||
if(is_array($remoteServers)){
|
||||
foreach($remoteServers as $server){
|
||||
foreach ((array)$remoteServers as $server){
|
||||
$remote = new OGPRemoteLibrary($server['agent_ip'], $server['agent_port'], $server['encryption_key'], 1);
|
||||
$status = (int)$remote->status_chk();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ function exec_ogp_module()
|
|||
&& !empty($_POST['gameserver_ip']) && !empty($_POST['gameserver_port']) && !empty($_POST['amx_mod_perms'])
|
||||
&& !empty($_POST['amx_login_type']) && (!empty($_POST['amx_Steamid']) || !empty($_POST['amx_Nickname']) && !empty($_POST['amx_Password']))){
|
||||
|
||||
foreach($servers as $server){
|
||||
foreach ((array)$servers as $server){
|
||||
// Try to check if hidden form values have been manually edited. If not, process.
|
||||
if($server['remote_server_id'] == $_POST['remote_server_id'] && $server['home_id'] == $_POST['amx_gameserver_id']
|
||||
&& $server['game_name'] == $_POST['gameserver_name'] && $server['ip'] == $_POST['gameserver_ip'] && $server['port'] == $_POST['gameserver_port']){
|
||||
|
|
@ -146,7 +146,7 @@ function exec_ogp_module()
|
|||
}
|
||||
}else{
|
||||
$return = array();
|
||||
for($x = 0; $x < count($servers); ++$x){
|
||||
for($x = 0; $x < count((array)$servers); ++$x){
|
||||
$return[] = array(
|
||||
'remote_server_id' => $servers[$x]['remote_server_id'],
|
||||
'ip' => $servers[$x]['ip'],
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ function getUserServers($servers, $flags, $supportedGames){
|
|||
$userRole = $userInfo['users_role'];
|
||||
|
||||
if(!empty($servers)){
|
||||
foreach($servers as $server){
|
||||
foreach ((array)$servers as $server){
|
||||
$gamehome = $db->getUserGameHome($_SESSION['user_id'], $server['home_id']);
|
||||
|
||||
if(in_array($gamehome['game_name'], $supportedGames) === true){
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ function exec_ogp_module()
|
|||
|
||||
// Loop over $availableCommands from util_config.php
|
||||
// Assign a variable, $allowAccess based on the current user's role and if the config file states the user's role is allowed access to this command.
|
||||
for($x = 0; $x < count($availableCommands); ++$x){
|
||||
for($x = 0; $x < count((array)$availableCommands); ++$x){
|
||||
if($availableCommands[$x]['title'] == $command){
|
||||
$command = $availableCommands[$x][$os];
|
||||
$allowAccess = $availableCommands[$x][$userRole];
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function exec_ogp_module()
|
|||
$userRole = $userInfo['users_role'];
|
||||
$commands = array();
|
||||
|
||||
foreach($availableCommands as $command){
|
||||
foreach ((array)$availableCommands as $command){
|
||||
if($userRole == 'admin' && $command['admin'] === true){
|
||||
$commands[] = '<option value="'.$command['title'].'">'.get_lang($command['title']).'</option>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue