From d532eb773bc460fe01a10e980fecbb1fdc53497c Mon Sep 17 00:00:00 2001 From: wn_ Date: Thu, 18 Nov 2021 18:23:44 +0000 Subject: Switch from null to false as the default for missing bool params. --- classes/pref/feeds.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes/pref/feeds.php') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 00fd140fe..d2a30662b 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -47,7 +47,7 @@ class Pref_Feeds extends Handler_Protected { $search = ""; // first one is set by API - $show_empty_cats = self::_param_to_bool($_REQUEST['force_show_empty'] ?? null) || + $show_empty_cats = self::_param_to_bool($_REQUEST['force_show_empty'] ?? false) || (clean($_REQUEST['mode'] ?? 0) != 2 && !$search); $items = []; @@ -208,7 +208,7 @@ class Pref_Feeds extends Handler_Protected { } if ($enable_cats) { - $show_empty_cats = self::_param_to_bool($_REQUEST['force_show_empty'] ?? null) || + $show_empty_cats = self::_param_to_bool($_REQUEST['force_show_empty'] ?? false) || (clean($_REQUEST['mode'] ?? 0) != 2 && !$search); $feed_categories = ORM::for_table('ttrss_feed_categories') @@ -1260,7 +1260,7 @@ class Pref_Feeds extends Handler_Protected { function regenFeedKey(): void { $feed_id = clean($_REQUEST['id']); - $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? null); + $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? false); $new_key = Feeds::_update_access_key($feed_id, $is_cat, $_SESSION["uid"]); @@ -1269,7 +1269,7 @@ class Pref_Feeds extends Handler_Protected { function getSharedURL(): void { $feed_id = clean($_REQUEST['id']); - $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? null); + $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? false); $search = clean($_REQUEST['search']); $link = Config::get_self_url() . "/public.php?" . http_build_query([ -- cgit v1.2.3