mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-04 07:12:28 +02:00
Copy the oid
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user