Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit f5252b9

Browse files
committed
updated to version 1.1.1
1 parent 8f5b32c commit f5252b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Traits/ComplementHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ private function getSettings()
247247
private function getLanguage()
248248
{
249249
$wpLang = (function_exists('get_locale')) ? get_locale() : null;
250-
$browserLang = @$_SERVER['HTTP_ACCEPT_LANGUAGE'] ?: null;
250+
$browserLang = null;
251+
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
252+
$browserLang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
253+
}
251254

252255
return substr($wpLang ?: $browserLang ?: 'en', 0, 2);
253256
}

0 commit comments

Comments
 (0)