Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Fixed execute_safe. If an error occurs $result will contain 'code' fi…
Browse files Browse the repository at this point in the history
…eld instead 'errno'
  • Loading branch information
sergeyklay committed Aug 7, 2013
1 parent e938ffd commit 4a65080
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/mongo/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function execute_safe( $code, array $args = array(), $scope = array() )
$result = $this->execute($code, $args);
if( empty($result['ok']) )
{
throw new MongoException($result['errmsg'], $result['errno']);
throw new MongoException($result['errmsg'], $result['code']);
}
return $result['retval'];
}
Expand Down

0 comments on commit 4a65080

Please sign in to comment.