1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
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/2] 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/2] 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;
|