Skip to content

Commit

Permalink
Fixed a bug related to: #217
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed May 22, 2014
1 parent 700f941 commit 0f91332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EMongoModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ public function getError($attribute)

$prev=null;
foreach(explode('[',$attribute) as $piece){
if($prev===null&&isset($this->errors[$piece]))
$prev=&$this->_errors[$piece];
if($prev===null&&isset($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 0f91332

Please sign in to comment.