summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorfox <[email protected]>2021-11-19 07:36:15 +0300
committerfox <[email protected]>2021-11-19 07:36:15 +0300
commit0a3a464defbe67092a0bd155cb2f6afcf379da2e (patch)
treedf4d699e5d11d5a6f19f26472a1702cbcbad7f4e /classes/rpc.php
parent3070933f649c097ca8ed02a8aea61eede1408b45 (diff)
parent4a891b20f06e04b015d4da9b755d444b915f4b7d (diff)
Merge pull request 'Consistently handle param string to bool conversions in handlers.' (#53) from wn/tt-rss:feature/consistent-param-to-bool into master
Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/53
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-xclasses/rpc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index 75d008b8b..4f6a2fe1d 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -173,7 +173,7 @@ class RPC extends Handler_Protected {
}
function sanityCheck(): void {
- $_SESSION["hasSandbox"] = clean($_REQUEST["hasSandbox"]) === "true";
+ $_SESSION["hasSandbox"] = self::_param_to_bool($_REQUEST["hasSandbox"] ?? false);
$_SESSION["clientTzOffset"] = clean($_REQUEST["clientTzOffset"]);
$client_location = $_REQUEST["clientLocation"];
@@ -225,7 +225,7 @@ class RPC extends Handler_Protected {
function catchupFeed(): void {
$feed_id = clean($_REQUEST['feed_id']);
- $is_cat = clean($_REQUEST['is_cat']) == "true";
+ $is_cat = self::_param_to_bool($_REQUEST['is_cat'] ?? false);
$mode = clean($_REQUEST['mode'] ?? '');
$search_query = clean($_REQUEST['search_query']);
$search_lang = clean($_REQUEST['search_lang']);