diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-03-18 22:44:02 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-03-23 18:59:04 +0100 |
commit | 01b266aac405c3c4c677d46f348dc6b227b69f7f (patch) | |
tree | d1c68e09fa5f200542b2424c084bc25bb2a5397f /ext/pcre/php_pcre.c | |
parent | d7b73de8c9299ef1e7c55f22449dff3e0833f68e (diff) | |
download | php-git-01b266aac405c3c4c677d46f348dc6b227b69f7f.tar.gz |
Improve error messages of various extensions
Closes GH-5278
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 fdc1b1b856..fc98542ef9 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2303,7 +2303,7 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) } } else { if (Z_TYPE_P(regex) != IS_ARRAY) { - zend_type_error("Parameter mismatch, pattern is a string while replacement is an array"); + zend_argument_type_error(1, "must be of type array when argument #2 ($replace) is an array, %s given", zend_zval_type_name(regex)); RETURN_THROWS(); } } |