Copy the oid

This commit is contained in:
Hannes Magnusson
2014-07-30 01:49:38 +00:00
parent 84a215df30
commit ff87de2d0f

View File

@@ -557,7 +557,8 @@ void php_phongo_objectid_new_from_oid(zval *object, const bson_oid_t *oid TSRMLS
object_init_ex(object, php_phongo_objectid_ce);
intern = (php_phongo_objectid_t *)zend_object_store_get_object(object TSRMLS_CC);
intern->oid = oid;
intern->oid = ecalloc(1, sizeof(bson_oid_t));
bson_oid_copy(oid, (bson_oid_t *)intern->oid);
} /* }}} */
/* {{{ Iterator */