fix: resolve three server-start errors (home_id warning, cfg_text_replace TypeError)
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/9cc2a00d-58ae-48d6-91e3-e52fae97426c Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
e81e63bf1b
commit
184c0bbfd7
2 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ $replace_texts = $server_xml->replace_texts->text;
|
|||
$replace_id = 0;
|
||||
if($replace_texts)
|
||||
{
|
||||
foreach ((array)$replace_texts as $text => $array )
|
||||
foreach ($replace_texts as $array )
|
||||
{
|
||||
$param = (string)$array['key'];
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ $custom_fields = json_decode($db->getCustomFields($server_home["home_id"]), True
|
|||
$fields = $server_xml->custom_fields->field;
|
||||
if($fields)
|
||||
{
|
||||
foreach ((array)$fields as $text => $array )
|
||||
foreach ($fields as $array )
|
||||
{
|
||||
foreach ((array)$array as $key => $value )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ function exec_ogp_module() {
|
|||
$stats_players = 0;
|
||||
$stats_maxplayers = 0;
|
||||
|
||||
$home_id = $_GET['home_id'];
|
||||
$home_id = $_GET['home_id'] ?? null;
|
||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
$home_page = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue