Check Accept-Language existence before use
This commit is contained in:
parent
bd443a1060
commit
70fe23d053
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 New Issue
Block a user