Skip to content

Commit

Permalink
Merge pull request #1 from hbin001/master
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
hongshu7 authored Jun 7, 2018
2 parents 0766757 + 146ba6f commit c1eab53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fasim/Core/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ public function fromArray($source) {
//fixed objectid
foreach ($source as $k => &$v) {
if (isset($this->schema[$k]) && $this->schema[$k]['type'] == 'objectid') {
$v = new \MongoDB\BSON\ObjectID($v);
if ($v != '') {
$v = new \MongoDB\BSON\ObjectID($v);
}
}
}
//todo: $this->setDisableRecord();
Expand Down

0 comments on commit c1eab53

Please sign in to comment.