Skip to content

Commit

Permalink
Fixed: #149
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Oct 27, 2013
1 parent 7eb6287 commit b9f4b5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EMongoDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public function findOne($criteria = array(), $fields = array()){

if(($record=$this->getCollection()->findOne($query,$project)) !== null){
$this->resetScope();
return $this->populateRecord($record, true, $fields === array() ? false : true);
return $this->populateRecord($record, true, $project === array() ? false : true);
}
return null;
}
Expand Down Expand Up @@ -831,7 +831,7 @@ public function find($criteria = array(), $fields = array()){
$this->resetScope();
return $cursor;
}
return new EMongoCursor($this, $criteria, $fields);
return new EMongoCursor($this, $criteria, $project);
}

/**
Expand Down

0 comments on commit b9f4b5d

Please sign in to comment.