summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-29 20:06:13 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-17 14:22:17 +0100
commitac0853eb265784c4238af652de9c54c883ffa99f (patch)
treee9316872480304e9e74ce89bd15052965cc18438 /ext/standard/string.c
parent72bd55902d1908857f47555ad69458861e1acd94 (diff)
downloadphp-git-ac0853eb265784c4238af652de9c54c883ffa99f.tar.gz
Make type error messages more consistent
Closes GH-5092
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 6fb9683c5a..bd68a6c08b 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1276,7 +1276,7 @@ PHP_FUNCTION(implode)
if (pieces == NULL) {
if (arg1_array == NULL) {
- zend_type_error("Argument must be an array");
+ zend_type_error("%s() expects argument #1 ($pieces) to be of type array, string given", get_active_function_name());
RETURN_THROWS();
}
@@ -1284,7 +1284,7 @@ PHP_FUNCTION(implode)
pieces = arg1_array;
} else {
if (arg1_str == NULL) {
- zend_type_error("The first argument must be a string");
+ zend_type_error("%s() expects argument #1 ($glue) to be of type string, array given", get_active_function_name());
RETURN_THROWS();
}
}