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
|
From e27ff18ac768aae1cf955111179ec68307d37475 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Thu, 23 May 2019 13:19:20 +0200
Subject: [PATCH] fix php_pcre_match_impl call for 7.4
---
provider.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/provider.c b/provider.c
index 1543d25..e2cd075 100644
--- a/provider.c
+++ b/provider.c
@@ -205,6 +205,9 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
zval subpats, return_value, *item_param, *current_param, *current_val;
HashPosition hpos;
zend_string *regex = zend_string_init(OAUTH_REGEX, sizeof(OAUTH_REGEX) - 1, 0);
+#if PHP_VERSION_ID >= 70400
+ zend_string *s_auth_header = zend_string_init(auth_header, strlen(auth_header), 0);
+#endif
size_t decoded_len;
if(!auth_header || strncasecmp(auth_header, "oauth", 4) || !sop) {
@@ -224,8 +227,12 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
php_pcre_match_impl(
pce,
+#if PHP_VERSION_ID >= 70400
+ s_auth_header,
+#else
auth_header,
strlen(auth_header),
+#endif
&return_value,
&subpats,
1, /* global */
|