Changed return value from null to empty string in UriParser::setQueryUri method, if query params were not pass. It needs, so that Paginator::setQueryUri str_replace get empty string instead of null and does not crash.
Added additional step for identification current page before processing pagination query in the QueryBuilder::basePaginate method. It needs, because the QueryBuilder::basePaginate is private and is called only once and only in this class. The method calls without $page parameter passing, so that the $page will always be 1 and the Paginator::items will have incorrect items.
UriParser::setQueryUri
method, if query params were not pass. It needs, so thatPaginator::setQueryUri
str_replace get empty string instead ofnull
and does not crash.QueryBuilder::basePaginate
method. It needs, because theQueryBuilder::basePaginate
is private and is called only once and only in this class. The method calls without$page
parameter passing, so that the$page
will always be1
and thePaginator::items
will have incorrect items.