diff options
author | Andrew Dolgov <[email protected]> | 2018-06-18 23:50:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-06-18 23:50:32 +0300 |
commit | d00d515320adb57165f7a69bd1c9afc72d51b87f (patch) | |
tree | ca9688de1db997d555fe19662d52e7e22bd96b85 /include/feedbrowser.php | |
parent | 149e903dd1f35d89c94e4505bfc680fc5f8987bf (diff) |
feedbrowser: fix incorrect usage of LIMIT in prepared statement
Diffstat (limited to 'include/feedbrowser.php')
-rw-r--r-- | include/feedbrowser.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/feedbrowser.php b/include/feedbrowser.php index a5a9f3dca..8ebeb20cc 100644 --- a/include/feedbrowser.php +++ b/include/feedbrowser.php @@ -24,8 +24,8 @@ (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf WHERE tf.feed_url = qqq.feed_url AND owner_uid = ?) $search_qpart - GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT ?"); - $sth->execute([$_SESSION['uid'], $limit]); + GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT " . (int)$limit); + $sth->execute([$_SESSION['uid']]); } else if ($mode == 2) { $sth = $pdo->prepare("SELECT *, @@ -38,9 +38,9 @@ WHERE ttrss_feeds.feed_url = ttrss_archived_feeds.feed_url AND owner_uid = :uid) = 0 AND owner_uid = :uid $search_qpart - ORDER BY id DESC LIMIT :limit"); + ORDER BY id DESC LIMIT " . (int)$limit); - $sth->execute([":uid" => $_SESSION['uid'], ":limit" => $limit]); + $sth->execute([":uid" => $_SESSION['uid']]); } $feedctr = 0; |