1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:15:55 +00:00

initial WIP for php8; bump php version requirement to 7.0

This commit is contained in:
Andrew Dolgov
2021-02-05 23:41:32 +03:00
parent b4cbc792cc
commit 403dca154c
28 changed files with 145 additions and 144 deletions

View File

@@ -15,7 +15,7 @@ class RPC extends Handler_Protected {
}
function remprofiles() {
$ids = explode(",", trim(clean($_REQUEST["ids"])));
$ids = explode(",", clean($_REQUEST["ids"]));
foreach ($ids as $id) {
if ($_SESSION["profile"] != $id) {
@@ -28,7 +28,7 @@ class RPC extends Handler_Protected {
// Silent
function addprofile() {
$title = trim(clean($_REQUEST["title"]));
$title = clean($_REQUEST["title"]);
if ($title) {
$this->pdo->beginTransaction();
@@ -63,7 +63,7 @@ class RPC extends Handler_Protected {
function saveprofile() {
$id = clean($_REQUEST["id"]);
$title = trim(clean($_REQUEST["value"]));
$title = clean($_REQUEST["value"]);
if ($id == 0) {
print __("Default profile");
@@ -85,7 +85,7 @@ class RPC extends Handler_Protected {
$cat = clean($_REQUEST['cat']);
$need_auth = isset($_REQUEST['need_auth']);
$login = $need_auth ? clean($_REQUEST['login']) : '';
$pass = $need_auth ? trim(clean($_REQUEST['pass'])) : '';
$pass = $need_auth ? clean($_REQUEST['pass']) : '';
$rc = Feeds::subscribe_to_feed($feed, $cat, $login, $pass);
@@ -546,7 +546,7 @@ class RPC extends Handler_Protected {
$data['daemon_is_running'] = (int) file_is_locked("update_daemon.lock");
if (time() - $_SESSION["daemon_stamp_check"] > 30) {
if (time() - ($_SESSION["daemon_stamp_check"] ?? 0) > 30) {
$stamp = (int) @file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp");