Skip to content

Commit cf18c5c

Browse files
committed
7.4
1 parent b7af9bb commit cf18c5c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: c
22

33
env:
4+
- MO_PHP_VERSION=7.4.19
45
- MO_PHP_VERSION=7.3.2
56
- MO_PHP_VERSION=7.2.2
67
- MO_PHP_VERSION=7.1.2

molten_intercept.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,12 @@ static char *pcre_common_match(char *pattern, int len, char *subject)
335335
#else
336336
if ((cache = pcre_get_compiled_regex_cache(pattern, len)) != NULL) {
337337
#endif
338+
#if PHP_VERSION_ID >= 70400
339+
zend_string *subject_str = zend_string_init(subject, strlen(subpats), 0);
340+
php_pcre_match_impl(cache, subject_str, result, subpats, 0, 0, 0, 0 TSRMLS_CC);
341+
#else
338342
php_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC);
343+
#endif
339344
zval *match = NULL;
340345
if (Z_LVAL_P(result) > 0 && MO_Z_TYPE_P(subpats) == IS_ARRAY) {
341346
#if PHP_VERSION_ID >= 70000

0 commit comments

Comments
 (0)