From 91f49ba17d3f0d36978985ce608f4972c948325d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 15 Oct 2017 16:47:44 +0300 Subject: [PATCH] api, setArticleLabel: allow JSON booleans --- classes/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/api.php b/classes/api.php index 97050e105..bb4d33247 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"]));