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:
copilot-swe-agent[bot] 2026-04-22 23:44:02 +00:00 committed by GitHub
parent cbd58ab88d
commit a5e656f629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"';