]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: getHeadlines: cast feed_it to int if needed
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 12 Jul 2015 10:18:03 +0000 (13:18 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 12 Jul 2015 10:18:03 +0000 (13:18 +0300)
classes/api.php

index cbb4720c1b6c0d1cbecd811edb8ebfbec0038416..2691625c7bfab7fb5df79ae2d07f306d19a3c06f 100644 (file)
@@ -184,6 +184,8 @@ class API extends Handler {
                $feed_id = $this->dbh->escape_string($_REQUEST["feed_id"]);
                if ($feed_id != "") {
 
+                       if (is_numeric($feed_id)) $feed_id = (int) $feed_id;
+
                        $limit = (int)$this->dbh->escape_string($_REQUEST["limit"]);
 
                        if (!$limit || $limit >= 200) $limit = 200;