From: Máté Kocsis Date: Thu, 12 Dec 2019 22:01:07 +0000 (+0100) Subject: Fix exception message of implode() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e699b2865fcc9b039ec5b52295e31572990674e0;p=php Fix exception message of implode() --- diff --git a/ext/standard/string.c b/ext/standard/string.c index e701a9bb0e..72b8123d94 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1284,7 +1284,7 @@ PHP_FUNCTION(implode) pieces = arg1_array; } else { if (arg1_str == NULL) { - zend_type_error("The first argument must be string"); + zend_type_error("The first argument must be a string"); return; } } diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt index 5088926550..ae460d6037 100644 Binary files a/ext/standard/tests/strings/implode1.phpt and b/ext/standard/tests/strings/implode1.phpt differ diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt index db11ff091a..c3035fb57f 100644 --- a/ext/standard/tests/strings/join_variation1.phpt +++ b/ext/standard/tests/strings/join_variation1.phpt @@ -125,15 +125,15 @@ string(29) "element11.07654321E-9element2" -- Iteration 9 -- string(19) "element10.5element2" -- Iteration 10 -- -The first argument must be string +The first argument must be a string -- Iteration 11 -- -The first argument must be string +The first argument must be a string -- Iteration 12 -- -The first argument must be string +The first argument must be a string -- Iteration 13 -- -The first argument must be string +The first argument must be a string -- Iteration 14 -- -The first argument must be string +The first argument must be a string -- Iteration 15 -- string(17) "element11element2" -- Iteration 16 -- diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 99a791ee56..e1739facc5 100644 Binary files a/ext/standard/tests/strings/join_variation4.phpt and b/ext/standard/tests/strings/join_variation4.phpt differ diff --git a/ext/standard/tests/strings/join_variation5.phpt b/ext/standard/tests/strings/join_variation5.phpt index 7880ff07ad..4e8ad88d14 100644 --- a/ext/standard/tests/strings/join_variation5.phpt +++ b/ext/standard/tests/strings/join_variation5.phpt @@ -41,7 +41,7 @@ Warning: Array to string conversion in %s on line %d Warning: Array to string conversion in %s on line %d string(27) "ArrayTESTArrayTESTPHPTEST50" -The first argument must be string +The first argument must be a string Warning: Array to string conversion in %s on line %d