Apply validation feedback cleanup for language and XML/Steam files

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/b16096ca-4ef7-4bb0-80e8-658767561478

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-06 23:00:36 +00:00 committed by GitHub
parent fecad6b0d4
commit 33cbb13d1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 10 deletions

View file

@ -131,18 +131,14 @@ function ogp_load_english_fallbacks()
function ogp_include_lang_file_safely($filePath)
{
$previous = set_error_handler(function ($severity, $message) {
set_error_handler(function ($severity, $message) {
if ($severity === E_WARNING && strpos($message, 'already defined') !== false) {
return true;
}
return false;
});
include_once($filePath);
if ($previous !== null) {
restore_error_handler();
} else {
restore_error_handler();
}
restore_error_handler();
}
function get_lang($lang_index)