fix: safely convert string date via strtotime before date() in edit_home.php
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/4522e78a-e21c-46ea-a5cb-c5d2d245e9ad Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
cbd58ab88d
commit
a5e656f629
1 changed files with 7 additions and 1 deletions
|
|
@ -763,7 +763,13 @@ function exec_ogp_module()
|
||||||
if ( $isAdmin )
|
if ( $isAdmin )
|
||||||
{
|
{
|
||||||
$master_server_home_id = $db->getMasterServer( $home_info['remote_server_id'], $home_info['home_cfg_id'] );
|
$master_server_home_id = $db->getMasterServer( $home_info['remote_server_id'], $home_info['home_cfg_id'] );
|
||||||
$expiration_date = !empty($home_info['server_expiration_date']) ? date( "d/m/Y H:i:s", $home_info['server_expiration_date'] ) : '';
|
$expiration_date = '';
|
||||||
|
if (!empty($home_info['server_expiration_date'])) {
|
||||||
|
$ts = strtotime($home_info['server_expiration_date']);
|
||||||
|
if ($ts !== false) {
|
||||||
|
$expiration_date = date("d/m/Y H:i:s", $ts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( $master_server_home_id != FALSE AND $master_server_home_id == $home_id )
|
if( $master_server_home_id != FALSE AND $master_server_home_id == $home_id )
|
||||||
$checked = 'checked ="checked"';
|
$checked = 'checked ="checked"';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue