summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-08-11 14:28:10 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-08-11 14:28:10 +0200
commit228bae7d74a7886f05716ef5ac0f3ba200caccc4 (patch)
treef65b77d41e5c019ae6a14f997495adc113a47aab /ext/pcre/php_pcre.c
parent4067519541850cfe47d031792f1d46829468706e (diff)
downloadphp-git-228bae7d74a7886f05716ef5ac0f3ba200caccc4.tar.gz
Use TypeError for preg_replace type check
This is a type violation warning, and as such should use TypeError in PHP 8.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 6002eedc78..4a603ec99d 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -2239,8 +2239,8 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter)
}
} else {
if (Z_TYPE_P(regex) != IS_ARRAY) {
- php_error_docref(NULL, E_WARNING, "Parameter mismatch, pattern is a string while replacement is an array");
- RETURN_FALSE;
+ zend_type_error("Parameter mismatch, pattern is a string while replacement is an array");
+ return;
}
}