Check Accept-Language existence before use
This commit is contained in:
parent
bd443a1060
commit
70fe23d053
1 changed files with 1 additions and 1 deletions
2
inc.php
2
inc.php
|
@ -11,7 +11,7 @@ define("DEFAULT_MAINCOLOR", "000000");
|
|||
$libreqrVersion = "1.3.0";
|
||||
|
||||
// Defines the locale to be used
|
||||
if ($forceLocale == false) {
|
||||
if ($forceLocale == false AND isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$clientLocales = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
|
||||
$clientLocales = preg_replace("#[A-Z0-9]|q=|;|-|\.#", "", $clientLocales);
|
||||
$clientLocales = explode(',', $clientLocales);
|
||||
|
|
Loading…
Reference in a new issue