🆙 Fixed and no bugs anymore 🆙

This commit is contained in:
Remco
2026-01-07 20:01:53 +01:00
parent 6bf99066a5
commit 65ea6c167f
34 changed files with 63 additions and 63 deletions
@@ -24,9 +24,10 @@ class LocalizationMiddleware
$countryCode = config('habbo.site.default_language');
// GEWIJZIGD: isset() werkt niet op Request::server() in PHP 8. Gebruik null !== in plaats daarvan.
if (\Illuminate\Support\Facades\Request::server('HTTP_CF_IPCOUNTRY') !== null) {
if (null !== \Illuminate\Support\Facades\Request::server('HTTP_CF_IPCOUNTRY')) {
$countryCode = strtolower((string) \Illuminate\Support\Facades\Request::server('HTTP_CF_IPCOUNTRY'));
} elseif (\Illuminate\Support\Facades\Request::server('HTTP_ACCEPT_LANGUAGE') !== null) {
}
elseif (null !== \Illuminate\Support\Facades\Request::server('HTTP_ACCEPT_LANGUAGE')) {
$countryCode = strtolower(substr((string) \Illuminate\Support\Facades\Request::server('HTTP_ACCEPT_LANGUAGE'), 0, 2));
}
@@ -46,4 +47,4 @@ class LocalizationMiddleware
return $next($request);
}
}
}