Skip to content
Snippets Groups Projects
Commit ad06bb37 authored by Dimitris Bozelos's avatar Dimitris Bozelos
Browse files

Issue #3380375 Corrected page calculation based on limit/offset

parent aa8d0fea
No related branches found
No related tags found
No related merge requests found
......@@ -288,7 +288,7 @@ class ObjectClient implements ClientInterface, ObjectClientInterface {
// If not given, the PHP SDK will apply the default of 1 i.e. start at the
// first page.
if (!empty($filters['offset']) && isset($request_options['limit'])) {
$request_options['page'] = (int) ceil($filters['offset'] / $request_options['limit']);
$request_options['page'] = ((int) floor($filters['offset'] / $request_options['limit'])) + 1;
}
return $request_options;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment