mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Improve error messages of various extensions
Closes GH-5278
This commit is contained in:
parent
d7b73de8c9
commit
01b266aac4
29 changed files with 100 additions and 100 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue