From 9f338f1ff1ffd4ae1a01bb1d1c0054077010b146 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 13 May 2023 00:10:16 +0200 Subject: [PATCH] fix null category id --- src/ManageFeedVars.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ManageFeedVars.php b/src/ManageFeedVars.php index 4f7c1e2..2b2a2be 100644 --- a/src/ManageFeedVars.php +++ b/src/ManageFeedVars.php @@ -157,7 +157,7 @@ class ManageFeedVars $feed_lang = !empty($_POST['feed_lang']) && is_string($_POST['feed_lang']) ? $_POST['feed_lang'] : $feed_lang; $feed_tags = !empty($_POST['feed_tags']) && is_string($_POST['feed_tags']) ? $_POST['feed_tags'] : $feed_tags; $feed_get_tags = empty($_POST['feed_get_tags']) ? $feed_get_tags : true; - $feed_cat_id = empty($_POST['feed_cat_id']) ? $feed_cat_id : $_POST['feed_cat_id']; + $feed_cat_id = !empty($_POST['feed_cat_id']) && is_numeric($_POST['feed_cat_id']) ? (int) $_POST['feed_cat_id'] : $feed_cat_id; $feed_upd_int = !empty($_POST['feed_upd_int']) && is_numeric($_POST['feed_upd_int']) ? (int) $_POST['feed_upd_int'] : $feed_upd_int; $feed_status = empty($_POST['feed_status']) ? $feed_status : 1; }