Skip to content

Commit e951202

Browse files
authored
Remove useless check, search_str is always true here (#10322)
1 parent abc41c2 commit e951202

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/standard/string.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -4141,9 +4141,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, bool case_sensi
41414141

41424142
/* Make sure we're dealing with strings and do the replacement. */
41434143
if (search_str && replace_ht) {
4144-
zend_argument_type_error(2, "must be of type %s when argument #1 ($search) is %s",
4145-
search_str ? "string" : "array", search_str ? "a string" : "an array"
4146-
);
4144+
zend_argument_type_error(2, "must be of type string when argument #1 ($search) is a string");
41474145
RETURN_THROWS();
41484146
}
41494147

0 commit comments

Comments
 (0)