fix several warnings related to feed editor

This commit is contained in:
Andrew Dolgov 2021-02-08 11:46:43 +03:00
parent 43abc183ab
commit d293cbd5a9
2 changed files with 11 additions and 11 deletions

View File

@ -999,28 +999,28 @@ class Pref_Feeds extends Handler_Protected {
$site_url = clean($_POST["site_url"]);
$upd_intl = (int) clean($_POST["update_interval"]);
$purge_intl = (int) clean($_POST["purge_interval"]);
$feed_id = (int) clean($_POST["id"]); /* editSave */
$feed_ids = explode(",", clean($_POST["ids"])); /* batchEditSave */
$feed_id = (int) clean($_POST["id"] ?? 0); /* editSave */
$feed_ids = explode(",", clean($_POST["ids"] ?? "")); /* batchEditSave */
$cat_id = (int) clean($_POST["cat_id"]);
$auth_login = clean($_POST["auth_login"]);
$auth_pass = clean($_POST["auth_pass"]);
$private = checkbox_to_sql_bool(clean($_POST["private"]));
$private = checkbox_to_sql_bool(clean($_POST["private"] ?? ""));
$include_in_digest = checkbox_to_sql_bool(
clean($_POST["include_in_digest"]));
clean($_POST["include_in_digest"] ?? ""));
$cache_images = checkbox_to_sql_bool(
clean($_POST["cache_images"]));
clean($_POST["cache_images"] ?? ""));
$hide_images = checkbox_to_sql_bool(
clean($_POST["hide_images"]));
clean($_POST["hide_images"] ?? ""));
$always_display_enclosures = checkbox_to_sql_bool(
clean($_POST["always_display_enclosures"]));
clean($_POST["always_display_enclosures"] ?? ""));
$mark_unread_on_update = checkbox_to_sql_bool(
clean($_POST["mark_unread_on_update"]));
clean($_POST["mark_unread_on_update"] ?? ""));
$feed_language = clean($_POST["feed_language"]);
if (!$batch) {
if (clean($_POST["need_auth"]) !== 'on') {
if (clean($_POST["need_auth"] ?? "") !== 'on') {
$auth_login = '';
$auth_pass = '';
}

View File

@ -159,8 +159,8 @@ class Af_Readability extends Plugin {
$enabled_feeds = $this->get_stored_array("enabled_feeds");
$append_feeds = $this->get_stored_array("append_feeds");
$enable = checkbox_to_sql_bool($_POST["af_readability_enabled"]);
$append = checkbox_to_sql_bool($_POST["af_readability_append"]);
$enable = checkbox_to_sql_bool($_POST["af_readability_enabled"] ?? "");
$append = checkbox_to_sql_bool($_POST["af_readability_append"] ?? "");
$enable_key = array_search($feed_id, $enabled_feeds);
$append_key = array_search($feed_id, $append_feeds);