Skip to content

Commit 04774df

Browse files
committed
Add missing handler
1 parent fb6594f commit 04774df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

php_phongo.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ static void php_phongo_unset_property(zend_object *zobj, zend_string *name, void
193193
zend_hash_del(zobj->handlers->get_properties(zobj), name);
194194
}
195195

196+
static zval *php_phongo_get_property_ptr_ptr(zend_object *zobj, zend_string *name, int type, void **cache_slot)
197+
{
198+
HashTable *props = zobj->handlers->get_properties(zobj);
199+
200+
zval *value = zend_hash_find(props, name);
201+
if (value) {
202+
return value;
203+
}
204+
return zend_hash_add(props, name, &EG(uninitialized_zval));
205+
}
206+
196207
PHP_MINIT_FUNCTION(mongodb) /* {{{ */
197208
{
198209
bson_mem_vtable_t bson_mem_vtable = {
@@ -235,6 +246,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
235246
phongo_std_object_handlers.write_property = php_phongo_write_property;
236247
phongo_std_object_handlers.has_property = php_phongo_has_property;
237248
phongo_std_object_handlers.unset_property = php_phongo_unset_property;
249+
phongo_std_object_handlers.get_property_ptr_ptr = php_phongo_get_property_ptr_ptr;
238250

239251
/* Initialize zend_class_entry dependencies.
240252
*

0 commit comments

Comments
 (0)