summaryrefslogtreecommitdiff
path: root/include/functions2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-12 22:54:55 +0300
committerAndrew Dolgov <[email protected]>2015-07-12 22:54:55 +0300
commitf7fd1edb76fcb3b56ef4d327f8851484e782a1f8 (patch)
tree38d9e73176f90d478afc2aa6b4b6a164c374d49f /include/functions2.php
parent8831632905398e5cfe2c3d071a5feaf8ac05d48b (diff)
first_id default value: type is important
Diffstat (limited to 'include/functions2.php')
-rw-r--r--include/functions2.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 11274b713..459a2a533 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -729,7 +729,7 @@
$start_ts_query_part = "";
}
- $first_id = false;
+ $first_id = 0;
// if previous topmost article id changed that means our current pagination is no longer valid
$query = "SELECT DISTINCT
ttrss_feeds.title,
@@ -760,10 +760,10 @@
}
$result = db_query($query);
- if ($result) {
+ if ($result && db_num_rows($result) > 0) {
$first_id = (int) db_fetch_result($result, 0, "id");
- if ($offset > 0 && $check_first_id && $first_id != $check_first_id) {
+ if ($offset > 0 && $first_id && $check_first_id && $first_id != $check_first_id) {
return array(-1, $feed_title, $feed_site_url, $last_error, $last_updated, $search_words, $first_id);
}
}