Skip to content

Commit

Permalink
Fixed bug in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Feb 26, 2014
1 parent d09c4c3 commit aec85da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions EMongoModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ public function __get($name){
try {
return parent::__get($name);
} catch (CException $e) {
if(method_exists($this,$getter))
$getter='get'.$name;
if(method_exists($this,$getter)){
throw $e;
elseif(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
}elseif(strncasecmp($name,'on',2)===0 && method_exists($this,$name)){
throw $e;

}
return null;
}
}
Expand Down Expand Up @@ -602,4 +603,4 @@ public function getJSONDocument(){
public function getBSONDocument(){
return bson_encode($this->getRawDocument());
}
}
}

2 comments on commit aec85da

@TatriX
Copy link
Contributor

@TatriX TatriX commented on aec85da Feb 26, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. Forgot to copy $getter='get'.$name; line.

@Sammaye
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok noticed it from the thread and added it :)

Please sign in to comment.