Skip to content

Commit 184c0bb

Browse files
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>
1 parent e81e63b commit 184c0bb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

modules/gamemanager/cfg_text_replace.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
$replace_id = 0;
5353
if($replace_texts)
5454
{
55-
foreach ((array)$replace_texts as $text => $array )
55+
foreach ($replace_texts as $array )
5656
{
5757
$param = (string)$array['key'];
5858

@@ -85,7 +85,7 @@
8585
$fields = $server_xml->custom_fields->field;
8686
if($fields)
8787
{
88-
foreach ((array)$fields as $text => $array )
88+
foreach ($fields as $array )
8989
{
9090
foreach ((array)$array as $key => $value )
9191
{

modules/gamemanager/server_monitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function exec_ogp_module() {
164164
$stats_players = 0;
165165
$stats_maxplayers = 0;
166166

167-
$home_id = $_GET['home_id'];
167+
$home_id = $_GET['home_id'] ?? null;
168168
$home_info = $db->getGameHomeWithoutMods($home_id);
169169

170170
$home_page = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1;

0 commit comments

Comments
 (0)