From a5e656f629000128e2dc23a378a083cb5d3ff224 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 23:44:02 +0000 Subject: [PATCH] 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> --- modules/user_games/edit_home.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/user_games/edit_home.php b/modules/user_games/edit_home.php index 67b9eb4f..5b5a1fc0 100644 --- a/modules/user_games/edit_home.php +++ b/modules/user_games/edit_home.php @@ -763,7 +763,13 @@ function exec_ogp_module() if ( $isAdmin ) { $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 ) $checked = 'checked ="checked"';