From c61b96d3f9c3f7ce58dd6112204d5cf4c757f4e5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 15 Sep 2022 09:08:40 +0200 Subject: add patch for PHP 8.2 from https://github.com/SeasX/SeasSnowflake/pull/9 --- 9.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 9.patch (limited to '9.patch') diff --git a/9.patch b/9.patch new file mode 100644 index 0000000..c37a501 --- /dev/null +++ b/9.patch @@ -0,0 +1,22 @@ +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 -- cgit