Skip to content
Snippets Groups Projects
Commit f2e41d19 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed potential divide by zero error.

parent 4f1857c1
No related merge requests found
......@@ -135,7 +135,8 @@ class Backend implements BackendInterface
$baseParams->mergeWith($params);
}
$baseParams->set('pageSize', $limit);
$baseParams->set('pageNumber', floor($offset / $limit) + 1);
$page = $limit > 0 ? floor($offset / $limit) + 1 : 1;
$baseParams->set('pageNumber', $page);
$summonQuery = $this->paramBagToSummonQuery($baseParams);
$response = $this->connector->query($summonQuery);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment