From: Evan Prodromou Date: Thu, 22 Mar 2012 02:53:02 +0000 (-0400) Subject: make sure we have an integer value for askFor X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d4bb8fa77a8df34178b3f2654fce30b633f1d622;p=quix0rs-gnu-social.git make sure we have an integer value for askFor --- diff --git a/lib/filteringnoticestream.php b/lib/filteringnoticestream.php index b5def44da7..9996578233 100644 --- a/lib/filteringnoticestream.php +++ b/lib/filteringnoticestream.php @@ -108,7 +108,7 @@ abstract class FilteringNoticeStream extends NoticeStream if ($hits === 0) { $askFor = max(min(2 * $askFor, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE); } 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.");