Skip to content

Commit e27ff18

Browse files
committed
fix php_pcre_match_impl call for 7.4
1 parent 16d6c4b commit e27ff18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

provider.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
205205
zval subpats, return_value, *item_param, *current_param, *current_val;
206206
HashPosition hpos;
207207
zend_string *regex = zend_string_init(OAUTH_REGEX, sizeof(OAUTH_REGEX) - 1, 0);
208+
#if PHP_VERSION_ID >= 70400
209+
zend_string *s_auth_header = zend_string_init(auth_header, strlen(auth_header), 0);
210+
#endif
208211
size_t decoded_len;
209212

210213
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_
224227

225228
php_pcre_match_impl(
226229
pce,
230+
#if PHP_VERSION_ID >= 70400
231+
s_auth_header,
232+
#else
227233
auth_header,
228234
strlen(auth_header),
235+
#endif
229236
&return_value,
230237
&subpats,
231238
1, /* global */

0 commit comments

Comments
 (0)