make sure we have an integer value for askFor
This commit is contained in:
parent
8981a420c1
commit
7e76d116d8
@ -108,7 +108,7 @@ abstract class FilteringNoticeStream extends NoticeStream
|
|||||||
if ($hits === 0) {
|
if ($hits === 0) {
|
||||||
$askFor = max(min(2 * $askFor, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
|
$askFor = max(min(2 * $askFor, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
|
||||||
} else {
|
} else {
|
||||||
$askFor = max(min((($total - $hits)*$startAt)/$hits, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
|
$askFor = max(min(intval(ceil(($total - $hits)*$startAt/$hits)), NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
common_debug(get_class($this) . ": ($offset, $limit) Round $round hits is $hits, results = $results.");
|
common_debug(get_class($this) . ": ($offset, $limit) Round $round hits is $hits, results = $results.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user