1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 07:05:56 +00:00

fix various issues reported by static analysis

update gitlab-ci config
This commit is contained in:
Andrew Dolgov
2017-04-26 15:29:22 +03:00
parent b49bb441f4
commit 7b55001eee
20 changed files with 142 additions and 160 deletions

View File

@@ -23,7 +23,7 @@
ini_set("session.gc_maxlifetime", $session_expire);
ini_set("session.cookie_lifetime", min(0, SESSION_COOKIE_LIFETIME));
function session_get_schema_version($nocache = false) {
function session_get_schema_version() {
global $schema_version;
if (!$schema_version) {
@@ -39,7 +39,7 @@
function validate_session() {
if (SINGLE_USER_MODE) return true;
if (isset($_SESSION["ref_schema_version"]) && $_SESSION["ref_schema_version"] != session_get_schema_version(true)) {
if (isset($_SESSION["ref_schema_version"]) && $_SESSION["ref_schema_version"] != session_get_schema_version()) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (schema version changed)");
return false;
@@ -72,7 +72,9 @@
return true;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function ttrss_open ($s, $n) {
return true;
}
@@ -117,6 +119,9 @@
return true;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function ttrss_gc ($expire) {
Db::get()->query("DELETE FROM ttrss_sessions WHERE expire < " . time());