Merge branch 'PHP-8.2'

* PHP-8.2:
  Fix preg_replace_callback_array() pattern validation
This commit is contained in:
Ilija Tovilo 2023-05-24 13:42:44 +02:00
commit 32968f8de0
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
2 changed files with 19 additions and 0 deletions

View file

@ -2406,6 +2406,10 @@ PHP_FUNCTION(preg_replace_callback_array)
zend_argument_type_error(1, "must contain only valid callbacks");
goto error;
}
if (!str_idx_regex) {
zend_argument_type_error(1, "must contain only string patterns as keys");
goto error;
}
ZVAL_COPY_VALUE(&fci.function_name, replace);