aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/language.php')
-rw-r--r--include/language.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/language.php b/include/language.php
index d291deb63..23aff0a02 100644
--- a/include/language.php
+++ b/include/language.php
@@ -311,6 +311,11 @@ function string_plural_select_default($n) {
* @return string Language code in 2-letter ISO 639-1 (en, de, fr) format
*/
function detect_language($s) {
+
+ if (!$s) {
+ return EMPTY_STR;
+ }
+
$min_length = get_config('system', 'language_detect_min_length');
if ($min_length === false)
$min_length = LANGUAGE_DETECT_MIN_LENGTH;