From b164b83c6a25a820df4ada579dbd80c962a85b24 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 15 Sep 2022 09:02:36 +0200 Subject: [PATCH] declare class properties --- SeasSnowflake.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SeasSnowflake.cpp b/SeasSnowflake.cpp index 7c5fee0..12c0d99 100644 --- a/SeasSnowflake.cpp +++ b/SeasSnowflake.cpp @@ -94,6 +94,8 @@ PHP_MINIT_FUNCTION(SeasSnowflake) INIT_CLASS_ENTRY(SeasSnowflake, SEASSNOWFLAKE_RES_NAME, SeasSnowflake_methods); #if PHP_VERSION_ID >= 70000 SeasSnowflake_ce = zend_register_internal_class_ex(&SeasSnowflake, NULL); + zend_declare_property_null(SeasSnowflake_ce, "worker_id", sizeof("worker_id")-1, ZEND_ACC_PUBLIC); + zend_declare_property_null(SeasSnowflake_ce, "datacenter_id", sizeof("datacenter_id")-1, ZEND_ACC_PUBLIC); #else SeasSnowflake_ce = zend_register_internal_class_ex(&SeasSnowflake, NULL, NULL TSRMLS_CC); #endif