fix for session
authorRoland Häder <roland@mxchange.org>
Sat, 23 Feb 2008 10:44:39 +0000 (10:44 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 23 Feb 2008 10:44:39 +0000 (10:44 +0000)
inc/functions.php

index 9a9ea0dfc89080b04fd6617f1cbed14bed1afa8b..5027229b64d5f18fbe29d9e6466f383836beb1f0 100644 (file)
@@ -660,6 +660,9 @@ function GET_LANGUAGE() {
        } elseif (!isSessionVariableSet('mx_lang')) {
                // Return stored value from cookie
                $ret = get_session('mx_lang');
+
+               // Fixes a warning before the session has the mx_lang constant
+               if (empty($ret)) $ret = DEFAULT_LANGUAGE;
        }
        return $ret;
 }