diff options
Diffstat (limited to '1251b877c4e3962c8d4d89d5a210fb380f8177ca.patch')
-rw-r--r-- | 1251b877c4e3962c8d4d89d5a210fb380f8177ca.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/1251b877c4e3962c8d4d89d5a210fb380f8177ca.patch b/1251b877c4e3962c8d4d89d5a210fb380f8177ca.patch deleted file mode 100644 index 142758d..0000000 --- a/1251b877c4e3962c8d4d89d5a210fb380f8177ca.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 873bc5031c511abbcbaa17117b86d0109f0fef91 Mon Sep 17 00:00:00 2001 -From: Joe Watkins <krakjoe@php.net> -Date: Thu, 6 Jun 2019 18:43:30 +0200 -Subject: [PATCH] really fix incorrect usage of zend_declare_class_constant_ex, - for PHP >=7.2 - ---- - kernels/ZendEngine3/main.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/kernels/ZendEngine3/main.c b/kernels/ZendEngine3/main.c -index c940e0e26..c8d45ce0b 100644 ---- a/kernels/ZendEngine3/main.c -+++ b/kernels/ZendEngine3/main.c -@@ -387,7 +387,24 @@ zend_class_entry* zephir_get_internal_ce(const char *class_name, unsigned int cl - /* Declare constants */ - int zephir_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) - { --#if PHP_VERSION_ID >= 70100 -+#if PHP_VERSION_ID >= 70200 -+ int ret; -+ zend_string *key; -+ -+ if (ce->type == ZEND_INTERNAL_CLASS) { -+ key = zend_string_init_interned(name, name_length, 1); -+ } else { -+ key = zend_string_init(name, name_length, 0); -+ } -+ -+ zend_declare_class_constant_ex(ce, key, value, ZEND_ACC_PUBLIC, NULL); -+ -+ if (ce->type != ZEND_INTERNAL_CLASS) { -+ zend_string_release(key); -+ } -+ -+ return ret; -+#elif PHP_VERSION_ID >= 70100 - int ret; - - zend_string *key = zend_string_init(name, name_length, ce->type & ZEND_INTERNAL_CLASS); |