From: Andrew Dolgov Date: Sun, 15 Oct 2017 13:47:44 +0000 (+0300) Subject: api, setArticleLabel: allow JSON booleans X-Git-Tag: 17.12~116 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=91f49ba17d3f0d36978985ce608f4972c948325d;p=tt-rss.git api, setArticleLabel: allow JSON booleans --- diff --git a/classes/api.php b/classes/api.php index 97050e10..bb4d3324 100644 --- a/classes/api.php +++ b/classes/api.php @@ -466,7 +466,7 @@ class API extends Handler { $article_ids = array_filter(explode(",", $this->dbh->escape_string($_REQUEST["article_ids"])), is_numeric); $label_id = (int) $this->dbh->escape_string($_REQUEST['label_id']); - $assign = (bool) ($this->dbh->escape_string($_REQUEST['assign']) == "true"); + $assign = sql_bool_to_bool($_REQUEST['assign']); $label = $this->dbh->escape_string(Labels::find_caption( Labels::feed_to_label_id($label_id), $_SESSION["uid"]));