mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc/Locale
* coerce malformed locale values from GET to int instead of failing outright
This commit is contained in:
@@ -239,7 +239,7 @@ if (!CLI)
|
|||||||
User::save(); // save user-variables in session
|
User::save(); // save user-variables in session
|
||||||
|
|
||||||
// hard override locale for this call (should this be here..?)
|
// hard override locale for this call (should this be here..?)
|
||||||
if (isset($_GET['locale']) && ($loc = Locale::tryFrom($_GET['locale'])))
|
if (isset($_GET['locale']) && ($loc = Locale::tryFrom((int)$_GET['locale'])))
|
||||||
Lang::load($loc);
|
Lang::load($loc);
|
||||||
else
|
else
|
||||||
Lang::load(User::$preferedLoc);
|
Lang::load(User::$preferedLoc);
|
||||||
|
|||||||
Reference in New Issue
Block a user