Merge pull request #70 from GameServerPanel/copilot/fix-undefined-array-key-error
This commit is contained in:
commit
2a99becc4d
2 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ $replace_texts = $server_xml->replace_texts->text;
|
||||||
$replace_id = 0;
|
$replace_id = 0;
|
||||||
if($replace_texts)
|
if($replace_texts)
|
||||||
{
|
{
|
||||||
foreach ((array)$replace_texts as $text => $array )
|
foreach ($replace_texts as $array )
|
||||||
{
|
{
|
||||||
$param = (string)$array['key'];
|
$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;
|
$fields = $server_xml->custom_fields->field;
|
||||||
if($fields)
|
if($fields)
|
||||||
{
|
{
|
||||||
foreach ((array)$fields as $text => $array )
|
foreach ($fields as $array )
|
||||||
{
|
{
|
||||||
foreach ((array)$array as $key => $value )
|
foreach ((array)$array as $key => $value )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ function exec_ogp_module() {
|
||||||
$stats_players = 0;
|
$stats_players = 0;
|
||||||
$stats_maxplayers = 0;
|
$stats_maxplayers = 0;
|
||||||
|
|
||||||
$home_id = $_GET['home_id'];
|
$home_id = $_GET['home_id'] ?? null;
|
||||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||||
|
|
||||||
$home_page = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1;
|
$home_page = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue