guard against uninitialized property write, too
[m6w6/ext-pq] / src / php_pqcopy.c
index 89ab68c5037bab7207c37778a4cf93251c6872ab..a427f07a869b84e38db781ddd6eb2921366fe717 100644 (file)
@@ -308,6 +308,12 @@ static zend_function_entry php_pqcopy_methods[] = {
        {0}
 };
 
+PHP_MSHUTDOWN_FUNCTION(pqcopy)
+{
+       zend_hash_destroy(&php_pqcopy_object_prophandlers);
+       return SUCCESS;
+}
+
 PHP_MINIT_FUNCTION(pqcopy)
 {
        zend_class_entry ce = {0};
@@ -322,6 +328,8 @@ PHP_MINIT_FUNCTION(pqcopy)
        php_pqcopy_object_handlers.write_property = php_pq_object_write_prop;
        php_pqcopy_object_handlers.clone_obj = NULL;
        php_pqcopy_object_handlers.get_property_ptr_ptr = NULL;
+       php_pqcopy_object_handlers.get_gc = NULL;
+       php_pqcopy_object_handlers.get_properties = php_pq_object_properties;
        php_pqcopy_object_handlers.get_debug_info = php_pq_object_debug_info;
 
        zend_hash_init(&php_pqcopy_object_prophandlers, 4, NULL, NULL, 1);