summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-01-20 16:46:34 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-01-20 16:46:34 +0000
commit875814b68be16ba17b91429bc7f17213a6c5003c (patch)
treebdf32f037b1ef5f101e0893fd4d6a3f66f6ae9fa /ext/pcre
parent591b6e7d59935b5a9782c692c922ecf1e0372094 (diff)
downloadphp-git-875814b68be16ba17b91429bc7f17213a6c5003c.tar.gz
MFH: fixed bug #21758
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/php_pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 5bd8204410..5d6e4b2f5d 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1044,7 +1044,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl
zend_get_parameters_ex(ZEND_NUM_ARGS(), &regex, &replace, &subject, &limit) == FAILURE) {
WRONG_PARAM_COUNT;
}
- if (Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) {
+ if (!is_callable_replace && Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter mismatch, pattern is a string while replacement in an array.");
RETURN_FALSE;
}