]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
fix for session
[mailer.git] / 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;
 }