Skip to content

Commit 77d3706

Browse files
committed
Fix
1 parent f89a436 commit 77d3706

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

php_phongo.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ static int php_phongo_has_property(zend_object *zobj, zend_string *name, int has
188188
}
189189
return false;
190190
}
191+
static void php_phongo_unset_property(zend_object *zobj, zend_string *name, void **cache_slot)
192+
{
193+
zend_hash_del(zobj->handlers->get_properties(zobj), name);
194+
}
191195

192196
PHP_MINIT_FUNCTION(mongodb) /* {{{ */
193197
{
@@ -230,6 +234,7 @@ PHP_MINIT_FUNCTION(mongodb) /* {{{ */
230234
phongo_std_object_handlers.read_property = php_phongo_read_property;
231235
phongo_std_object_handlers.write_property = php_phongo_write_property;
232236
phongo_std_object_handlers.has_property = php_phongo_has_property;
237+
phongo_std_object_handlers.unset_property = php_phongo_unset_property;
233238

234239
/* Initialize zend_class_entry dependencies.
235240
*

0 commit comments

Comments
 (0)