diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-20 16:45:21 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-20 16:45:21 +0000 |
commit | e3e364f77b737bfa0e6645a644d8ee985de4c5bd (patch) | |
tree | 8f762a6e9f198e037abb5a7d8eb499dab84837c2 /ext/pcre/php_pcre.c | |
parent | aa8b1d6db31be6cef308c070c84624b1e17ae196 (diff) | |
download | php-git-e3e364f77b737bfa0e6645a644d8ee985de4c5bd.tar.gz |
Fixed bug #21758
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index d777c47dd6..3f5ef9a263 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(), ®ex, &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; } |