Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Fix "Division by zero" error
Browse files Browse the repository at this point in the history
The `hitsPerPage` default value must not be 0, otherwise it will break the pagination if the results are invalid.
  • Loading branch information
lukasbestle authored Jun 17, 2016
1 parent f712d1e commit 9bc5ab7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/algolia/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct($results) {
'page' => 0,
'nbHits' => 0,
'nbPages' => 0,
'hitsPerPage' => 0,
'hitsPerPage' => 20,
'processingTimeMS' => 0,
'query' => '',
'params' => ''
Expand Down

0 comments on commit 9bc5ab7

Please sign in to comment.