diff options
author | Andrew Dolgov <[email protected]> | 2021-02-05 23:41:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-05 23:41:32 +0300 |
commit | 403dca154c6b539de221f9e16174a0fdd0a1e896 (patch) | |
tree | 8187096f0e04ecb60440c8551514d990d0e85b2d /classes/pref/filters.php | |
parent | b4cbc792cc5fbbd5356f91038bf6cf5e67a19e42 (diff) |
initial WIP for php8; bump php version requirement to 7.0
Diffstat (limited to 'classes/pref/filters.php')
-rwxr-xr-x | classes/pref/filters.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 70b7d0326..d733ad9da 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -599,9 +599,9 @@ class Pref_Filters extends Handler_Protected { function editSave() { $filter_id = clean($_REQUEST["id"]); - $enabled = checkbox_to_sql_bool(clean($_REQUEST["enabled"])); + $enabled = checkbox_to_sql_bool(clean($_REQUEST["enabled"] ?? false)); $match_any_rule = checkbox_to_sql_bool(clean($_REQUEST["match_any_rule"])); - $inverse = checkbox_to_sql_bool(clean($_REQUEST["inverse"])); + $inverse = checkbox_to_sql_bool(clean($_REQUEST["inverse"] ?? false)); $title = clean($_REQUEST["title"]); $this->pdo->beginTransaction(); @@ -638,8 +638,8 @@ class Pref_Filters extends Handler_Protected { $sth = $this->pdo->prepare("DELETE FROM ttrss_filters2_actions WHERE filter_id = ?"); $sth->execute([$filter_id]); - if (!is_array(clean($_REQUEST["rule"]))) $_REQUEST["rule"] = []; - if (!is_array(clean($_REQUEST["action"]))) $_REQUEST["action"] = []; + if (!is_array(clean($_REQUEST["rule"] ?? ""))) $_REQUEST["rule"] = []; + if (!is_array(clean($_REQUEST["action"] ?? ""))) $_REQUEST["action"] = []; if ($filter_id) { /* create rules */ |