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:
parent
09acf90004
commit
aed7a4fccf
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue