diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/config.php | 3 | ||||
-rw-r--r-- | classes/userhelper.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/classes/config.php b/classes/config.php index 6e8d4533f..4ae4a2407 100644 --- a/classes/config.php +++ b/classes/config.php @@ -484,7 +484,8 @@ class Config { array_push($errors, "Data export cache is not writable (chmod -R 777 ".self::get(Config::CACHE_DIR)."/export)"); } - if (self::get(Config::SINGLE_USER_MODE) && class_exists("PDO")) { + // ttrss_users won't be there on initial startup (before migrations are done) + if (!Config::is_migration_needed() && self::get(Config::SINGLE_USER_MODE)) { if (UserHelper::get_login_by_id(1) != "admin") { array_push($errors, "SINGLE_USER_MODE is enabled but default admin account (ID: 1) is not found."); } diff --git a/classes/userhelper.php b/classes/userhelper.php index 0bf67243e..1cdd320a1 100644 --- a/classes/userhelper.php +++ b/classes/userhelper.php @@ -75,7 +75,7 @@ class UserHelper { $_SESSION["auth_module"] = false; - if (!$_SESSION["csrf_token"]) + if (empty($_SESSION["csrf_token"])) $_SESSION["csrf_token"] = bin2hex(get_random_bytes(16)); $_SESSION["ip_address"] = UserHelper::get_user_ip(); |