Skip to content

Commit 2133970

Browse files
committed
Fixed ValueError message in substr_compare()
It used some random argument name instead of
1 parent 6a5b3f0 commit 2133970

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5960,7 +5960,7 @@ PHP_FUNCTION(substr_compare)
59605960
}
59615961

59625962
if ((size_t)offset > ZSTR_LEN(s1)) {
5963-
zend_argument_value_error(3, "must be contained in argument #1 ($main_str)");
5963+
zend_argument_value_error(3, "must be contained in argument #1 ($haystack)");
59645964
RETURN_THROWS();
59655965
}
59665966

ext/standard/tests/strings/bug40754.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ string(6) "abcdex"
8181
int(0)
8282
int(0)
8383
substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
84-
substr_compare(): Argument #3 ($offset) must be contained in argument #1 ($main_str)
84+
substr_compare(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
8585
stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
8686
substr_count(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
8787
substr_count(): Argument #4 ($length) must be contained in argument #1 ($haystack)

0 commit comments

Comments
 (0)