Skip to content

Commit

Permalink
Fix counting on noncountable object for php 7.2 (#14)
Browse files Browse the repository at this point in the history
* Fix counting on noncountable object for php 7.2

* Better solution of uncountable

http://php.net/manual/en/migration72.incompatible.php
  • Loading branch information
mlazovla authored and Olicek committed Oct 23, 2018
1 parent 11ee652 commit 8874d43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Selectize.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ public function setValue($value)

public function getValue()
{
return count($this->selectize)
? $this->selectize
: NULL;
if (is_array($this->selectize) && count($this->selectize) === 0) {
return null;
}
return $this->selectize;
}


Expand Down

0 comments on commit 8874d43

Please sign in to comment.