diff --git a/.travis.yml b/.travis.yml index ee2f67c..b4bc666 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: c env: + - MO_PHP_VERSION=7.4.19 - MO_PHP_VERSION=7.3.2 - MO_PHP_VERSION=7.2.2 - MO_PHP_VERSION=7.1.2 diff --git a/molten_intercept.c b/molten_intercept.c index 05a8682..9d7b631 100644 --- a/molten_intercept.c +++ b/molten_intercept.c @@ -335,7 +335,12 @@ static char *pcre_common_match(char *pattern, int len, char *subject) #else if ((cache = pcre_get_compiled_regex_cache(pattern, len)) != NULL) { #endif +#if PHP_VERSION_ID >= 70400 + zend_string *subject_str = zend_string_init(subject, strlen(subpats), 0); + php_pcre_match_impl(cache, subject_str, result, subpats, 0, 0, 0, 0 TSRMLS_CC); +#else php_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC); +#endif zval *match = NULL; if (Z_LVAL_P(result) > 0 && MO_Z_TYPE_P(subpats) == IS_ARRAY) { #if PHP_VERSION_ID >= 70000