1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-08 07:01:32 +00:00

stop caching schema version entirely, fix some session_start() related warnings

This commit is contained in:
Andrew Dolgov
2021-02-25 15:28:27 +03:00
parent 1464abbbfc
commit efd196839a
6 changed files with 20 additions and 20 deletions

View File

@@ -59,8 +59,12 @@ class API extends Handler {
}
function login() {
@session_destroy();
@session_start();
if (session_status() == PHP_SESSION_ACTIVE) {
session_destroy();
}
session_start();
$login = clean($_REQUEST["user"]);
$password = clean($_REQUEST["password"]);

View File

@@ -390,7 +390,8 @@ class Handler_Public extends Handler {
} else {
// start an empty session to deliver login error message
@session_start();
if (session_status() != PHP_SESSION_ACTIVE)
session_start();
if (!isset($_SESSION["login_error_msg"]))
$_SESSION["login_error_msg"] = __("Incorrect username or password");

View File

@@ -87,7 +87,9 @@ class UserHelper {
$pdo = Db::pdo();
if (Config::get(Config::SINGLE_USER_MODE)) {
@session_start();
if (session_status() != PHP_SESSION_ACTIVE)
session_start();
self::authenticate("admin", null);
startup_gettext();
self::load_user_plugins($_SESSION["uid"]);