Skip to content

Commit

Permalink
Merge pull request #13 from michel-DoubleRs/patch-1
Browse files Browse the repository at this point in the history
check for null values when creating an index
  • Loading branch information
timgws committed Dec 14, 2015
2 parents a43ec35 + ead3d3e commit bf4474e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ElasticquentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,11 @@ public static function createIndex($shards = null, $replicas = null)
'index' => $instance->getIndexName(),
);

if ($shards) {
if (!is_null($shards)) {
$index['body']['settings']['number_of_shards'] = $shards;
}

if ($replicas) {
if (!is_null($replicas)) {
$index['body']['settings']['number_of_replicas'] = $replicas;
}

Expand Down

0 comments on commit bf4474e

Please sign in to comment.