Skip to content

Commit 36b783d

Browse files
committed
add type
1 parent 4b56d84 commit 36b783d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

class/Utility.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
};
77
use Xmf\Request;
88

9-
10-
119
/** @var Helper $helper */
1210
/** @var LanguageHandler $languageHandler */
1311

@@ -126,12 +124,11 @@ public static function langDetect($str = '', $envType = '')
126124
}
127125

128126
/**
129-
* @return string
127+
* @return string|bool
130128
*/
131129
public static function detectLang()
132130
{
133131
global $_SERVER;
134-
135132
// if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
136133
if (Request::hasVar('HTTP_ACCEPT_LANGUAGE', 'SERVER')) {
137134
$HTTP_ACCEPT_LANGUAGE = Request::getString('HTTP_ACCEPT_LANGUAGE', '', 'SERVER');
@@ -166,7 +163,7 @@ public static function detectLang()
166163
$lang = static::langDetect($HTTP_USER_AGENT, 2);
167164
}
168165
// 3. If we catch a valid language, configure it
169-
if (!empty($lang)) {
166+
if (!empty($lang)) {
170167
$xoops_lang = isset($available_languages[$lang][1])?:'';
171168
}
172169

0 commit comments

Comments
 (0)