Skip to content

Commit

Permalink
Merge pull request #173 from schmunk42/hotfix/boolean-compare
Browse files Browse the repository at this point in the history
Hotfix/boolean compare
  • Loading branch information
Sammaye committed Dec 2, 2013
2 parents a74a15a + 282db76 commit c16f123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EMongoDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ public function search($query = array(), $project = array(), $partialMatch=false

$value = $this->{$attribute};
if ($value !== null && $value !== ''){
if((is_array($value) && count($value)) || is_object($value)){
if((is_array($value) && count($value)) || is_object($value) || is_bool($value)){
$query[$attribute] = $value;
}elseif(preg_match('/^(?:\s*(<>|<=|>=|<|>|=))?(.*)$/', $value, $matches)) {
$value = $matches[2];
Expand Down

0 comments on commit c16f123

Please sign in to comment.