diff --git a/EMongoDocument.php b/EMongoDocument.php index 257d35c..f8418e7 100644 --- a/EMongoDocument.php +++ b/EMongoDocument.php @@ -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];