fix several warnings related to feed editor

master
Andrew Dolgov 4 years ago
parent 43abc183ab
commit d293cbd5a9

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

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

Loading…
Cancel
Save