diff options
Diffstat (limited to '35.patch')
-rw-r--r-- | 35.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/35.patch b/35.patch new file mode 100644 index 0000000..fe1116f --- /dev/null +++ b/35.patch @@ -0,0 +1,98 @@ +From 633d0a55cd23d17c6a2e964d7671348b682af761 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 4 Jul 2025 14:45:20 +0200 +Subject: [PATCH 1/3] arg_separators.input is an zend_string in 8.5 + +--- + oauth.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/oauth.c b/oauth.c +index 1493eb7..a7fd6cc 100644 +--- a/oauth.c ++++ b/oauth.c +@@ -60,7 +60,11 @@ static int oauth_parse_str(char *params, zval *dest_array) /* {{{ */ + } + + res = params; ++#if PHP_VERSION_ID < 80500 + separator = (char *) estrdup(PG(arg_separator).input); ++#else ++ separator = (char *) estrdup(ZSTR_VAL(PG(arg_separator).input)); ++#endif + var = php_strtok_r(res, separator, &strtok_buf); + while (var) { + val = strchr(var, '='); + +From aab3ebf39558954b5e84f3fc7f3cc5fb19e963a2 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 17 Jul 2025 11:30:54 +0200 +Subject: [PATCH 2/3] use zend_ce_exception instead of + zend_exception_get_default() for 8.5 + +--- + oauth.c | 4 ++-- + provider.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/oauth.c b/oauth.c +index a7fd6cc..a424097 100644 +--- a/oauth.c ++++ b/oauth.c +@@ -179,7 +179,7 @@ static void so_object_free_storage(zend_object *obj) /* {{{ */ + void soo_handle_error(php_so_object *soo, long errorCode, char *msg, char *response, char *additional_info) /* {{{ */ + { + zval ex; +- zend_class_entry *dex = zend_exception_get_default(), *soox = soo_exception_ce; ++ zend_class_entry *dex = zend_ce_exception, *soox = soo_exception_ce; + + object_init_ex(&ex, soox); + +@@ -2790,7 +2790,7 @@ PHP_MINIT_FUNCTION(oauth) + + INIT_CLASS_ENTRY(soo_ex_ce, "OAuthException", NULL); + +- soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_exception_get_default()); ++ soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_ce_exception); + #if PHP_VERSION_ID >= 80200 + soo_exception_ce->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; + zend_string *attribute_name_AllowDynamicProperties_class_OAuthException = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1); +diff --git a/provider.c b/provider.c +index f1f8e2a..02025fc 100644 +--- a/provider.c ++++ b/provider.c +@@ -981,7 +981,7 @@ SOP_METHOD(reportProblem) + sapi_header_line ctr = {0}; + zend_bool send_headers = 1; + +- ex_ce = zend_exception_get_default(); ++ ex_ce = zend_ce_exception; + + if(zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &exception, ex_ce, &send_headers)==FAILURE) { + return; + +From 7e79b4146d55891d1fa40dcc3c4893e4f72b3c1b Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 30 Jul 2025 13:14:45 +0200 +Subject: [PATCH 3/3] use Zend/zend_smart_string.h + +--- + php_oauth.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/php_oauth.h b/php_oauth.h +index 1b7c987..ccea410 100644 +--- a/php_oauth.h ++++ b/php_oauth.h +@@ -35,7 +35,11 @@ + #else + #include "ext/random/php_random.h" + #endif ++#if PHP_VERSION_ID < 70200 + #include "ext/standard/php_smart_string.h" ++#else ++#include "Zend/zend_smart_string.h" ++#endif + #include "ext/standard/info.h" + #include "ext/standard/php_string.h" + #if PHP_VERSION_ID > 80200 |