Refine language fallback warning matcher and legacy editor label text

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:03:18 +00:00 committed by GitHub
parent 09acf90004
commit aed7a4fccf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -132,7 +132,8 @@ function ogp_load_english_fallbacks()
function ogp_include_lang_file_safely($filePath)
{
set_error_handler(function ($severity, $message) {
if ($severity === E_WARNING && strpos($message, 'already defined') !== false) {
$isConstantRedefinition = (bool)preg_match('/^Constant\\s+.+\\s+already\\s+defined$/i', trim((string)$message));
if ($severity === E_WARNING && $isConstantRedefinition) {
return true;
}
return false;