Remove a PHPStan ignore related to PHP < 8

This commit is contained in:
wn_ 2025-04-27 14:39:06 +00:00
parent 0e4b8bd653
commit 0961c8bd4c

View File

@ -116,8 +116,6 @@
// create a list like "en" => 0.8
$langs = array_combine($lang_parse[1], $lang_parse[4]);
/** @phpstan-ignore function.alreadyNarrowedType (PHP 7.4 will return false if array_value has an issue) */
if (is_array($langs)) {
// set default to 1 for any without q factor
foreach ($langs as $lang => $val) {
if ($val === '') $langs[$lang] = 1;
@ -138,7 +136,6 @@
}
}
}
}
if (!empty($_SESSION["uid"]) && Config::get_schema_version() >= 120) {
$pref_locale = Prefs::get(Prefs::USER_LANGUAGE, $_SESSION["uid"], $_SESSION["profile"] ?? null);