]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Check for config file when running
[quix0rs-gnu-social.git] / lib / util.php
index 18e4f310ce0ef4b951809628dad0cb992fb0a0ee..f9a787d473262b52ad9ea5862803c36feda6fc06 100644 (file)
@@ -81,7 +81,7 @@ function common_language()
 
     // If there is a user logged in and they've set a language preference
     // then return that one...
-    if (common_logged_in()) {
+    if (_have_config() && common_logged_in()) {
         $user = common_current_user();
         $user_language = $user->language;
         if ($user_language)
@@ -315,6 +315,10 @@ function common_current_user()
 {
     global $_cur;
 
+    if (!_have_config()) {
+        return null;
+    }
+
     if ($_cur === false) {
 
         if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) {