diff --git a/private/lib/dao/DaoSaveableDefaultImplementation.php b/private/lib/dao/DaoSaveableDefaultImplementation.php index 7aafaf1..dcd3713 100644 --- a/private/lib/dao/DaoSaveableDefaultImplementation.php +++ b/private/lib/dao/DaoSaveableDefaultImplementation.php @@ -71,7 +71,7 @@ abstract class DaoSaveableDefaultImplementation implements DaoSaveable { private function toArray($input){ $rval = $input; if (is_object($rval) ){ - if (!($rval instanceof MongoId)){ + if (!($rval instanceof MongoId) && !($rval instanceof MongoDate) ){ $rval = (array)$input; } // $rval = (array)$input; @@ -118,7 +118,7 @@ abstract class DaoSaveableDefaultImplementation implements DaoSaveable { } } else if (is_object($rval)) { - if (!($rval instanceof MongoId)){ + if (!($rval instanceof MongoId) && !($rval instanceof MongoDate)){ foreach ( $rval as $key=>$val){ $rval->$key = $this->toObject($val); }