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
|
|
@ -85,10 +85,10 @@ function exec_ogp_module()
|
|||
$params = array('token' => $token);
|
||||
$response = getResponse($ip, $port, '/v2/bans/list/', $params);
|
||||
$bans_table = "<table>";
|
||||
foreach($response['bans'] as $ban)
|
||||
foreach ((array)$response['bans'] as $ban)
|
||||
{
|
||||
$bans_table .= "<tr>";
|
||||
foreach($ban as $ban_key => $ban_value)
|
||||
foreach ((array)$ban as $ban_key => $ban_value)
|
||||
$bans_table .= "<td><b>".strtoupper($ban_key)."</b>: ".$ban_value."</td>";
|
||||
$bans_table .= "</tr>";
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ function exec_ogp_module()
|
|||
if($response['status'] == '200')
|
||||
{
|
||||
$bans_table = "<table><tr>";
|
||||
foreach($response as $ban_key => $ban_value)
|
||||
foreach ((array)$response as $ban_key => $ban_value)
|
||||
if($ban_key != 'status')
|
||||
$bans_table .= "<td><b>".strtoupper($ban_key)."</b>: ".$ban_value."</td>";
|
||||
$bans_table .= "</tr></table>";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function getResponse($ip, $port, $query, $params = array()){
|
|||
if(!empty($params))
|
||||
{
|
||||
$api_request .= '?';
|
||||
foreach($params as $param_key => $param_value)
|
||||
foreach ((array)$params as $param_key => $param_value)
|
||||
$api_request .= $param_key."=".urlencode($param_value)."&";
|
||||
}
|
||||
return json_decode(file_get_contents($api_request), True);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ function exec_ogp_module()
|
|||
if($response['status'] == '200')
|
||||
{
|
||||
$response_table = "<pre>";
|
||||
foreach($response['response'] as $line)
|
||||
foreach ((array)$response['response'] as $line)
|
||||
$response_table .= $line."<br>";
|
||||
$response_table .= "</pre>";
|
||||
echo $response_table;
|
||||
|
|
@ -265,7 +265,7 @@ function exec_ogp_module()
|
|||
if($response['status'] == '200')
|
||||
{
|
||||
$rules_div = "<div><ul class='rules'>";
|
||||
foreach($response['rules'] as $line)
|
||||
foreach ((array)$response['rules'] as $line)
|
||||
$rules_div .= "<li>".$line."</li>";
|
||||
$rules_div .= "</ul></div>";
|
||||
echo $rules_div;
|
||||
|
|
@ -305,19 +305,19 @@ function exec_ogp_module()
|
|||
if($response['status'] == '200')
|
||||
{
|
||||
$status_table = "<table class='status'>";
|
||||
foreach($response as $key => $value)
|
||||
foreach ((array)$response as $key => $value)
|
||||
{
|
||||
if($key == "status")
|
||||
continue;
|
||||
if(is_array($value))
|
||||
{
|
||||
$status_table .= "<tr class='entry_t1'><td class='key'>".$key."</td><td><table class='status'>";
|
||||
foreach($value as $v_key => $v_value)
|
||||
foreach ((array)$value as $v_key => $v_value)
|
||||
{
|
||||
if(is_array($v_value))
|
||||
{
|
||||
$status_table .= "<tr><td class='key'>".$v_key."</td><td><table class='status'>";
|
||||
foreach($v_value as $v_subkey => $v_subvalue)
|
||||
foreach ((array)$v_value as $v_subkey => $v_subvalue)
|
||||
{
|
||||
$status_table .= "<tr class='entry_t2'><td class='key'>".$v_subkey."</td><td class='value'>".$v_subvalue."</td></tr>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if(!empty($home_cfg_ids))
|
|||
{
|
||||
$server_homes = array();
|
||||
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
||||
foreach($home_cfg_ids as $home_cfg_id)
|
||||
foreach ((array)$home_cfg_ids as $home_cfg_id)
|
||||
{
|
||||
if($isAdmin)
|
||||
$server_homes = array_merge($server_homes, $db->getHomesFor_limit('admin', $_SESSION['user_id'], 1, 9999, $home_cfg_id,''));
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ function exec_ogp_module()
|
|||
if($response['status'] == '200')
|
||||
{
|
||||
$users_table = "<table class='users_list'><theader><td>ID</td><td>Name</td><td>Group</td></theader>";
|
||||
foreach($response['users'] as $user)
|
||||
foreach ((array)$response['users'] as $user)
|
||||
$users_table .= "<tr><td class='user_id'>".$user['id']."</td><td class='user_name'>".$user['name']."</td><td class='user_group'>".$user['group']."</td></tr>";
|
||||
$users_table .= "</table>";
|
||||
echo $users_table;
|
||||
|
|
@ -218,7 +218,7 @@ function exec_ogp_module()
|
|||
$response = getResponse($ip, $port, '/v2/users/update/', $params);
|
||||
if($response['status'] == '200')
|
||||
{
|
||||
foreach($response as $key => $resp)
|
||||
foreach ((array)$response as $key => $resp)
|
||||
{
|
||||
if($key == "status")
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue