allow dynamic properties in Pq\Connection issue-php82 44/head
authorRemi Collet <remi@remirepo.net>
Thu, 8 Sep 2022 15:24:42 +0000 (17:24 +0200)
committerRemi Collet <remi@php.net>
Thu, 8 Sep 2022 15:24:42 +0000 (17:24 +0200)
src/php_pqconn.c

index 6278323627ebad84f102a12de5a0f6f2eb827f76..0b39d254c6c4d1e8acc8ff785e84062bf9d3c1d7 100644 (file)
@@ -2001,6 +2001,9 @@ PHP_MINIT_FUNCTION(pqconn)
        INIT_NS_CLASS_ENTRY(ce, "pq", "Connection", php_pqconn_methods);
        php_pqconn_class_entry = zend_register_internal_class_ex(&ce, NULL);
        php_pqconn_class_entry->create_object = php_pqconn_create_object;
+#if PHP_VERSION_ID >= 80200
+       php_pqconn_class_entry->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
+#endif
 
        memcpy(&php_pqconn_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
        php_pqconn_object_handlers.offset = XtOffsetOf(php_pqconn_object_t, zo);