Skip to content

Commit

Permalink
Fix for: #218
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed May 23, 2014
1 parent 0f91332 commit 6741c3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions EMongoCursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ public function limit($num = 0){
$this->cursor()->limit($num);
return $this;
}

public function timeout($ms){
$this->cursor()->timeout($ms);
return $this;
}

/**
* Reset the MongoCursor to the beginning
Expand Down
2 changes: 1 addition & 1 deletion EMongoModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public function getErrors($attribute=null)
$prev=null;
foreach(explode('[',$attribute) as $piece){
if($prev===null&&isset($this->errors[$piece]))
$prev=&$this->_errors[$piece];
$prev=$this->_errors[$piece];
elseif(isset($prev[$piece]))
$prev=is_array($prev)?$prev[$piece]:$prev->$piece;
}
Expand Down

0 comments on commit 6741c3c

Please sign in to comment.