Skip to content

Commit 2d44a04

Browse files
committed
fixed str_pad()
1 parent d6c59e1 commit 2d44a04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5221,7 +5221,7 @@ PHP_FUNCTION(str_pad)
52215221

52225222
/* If resulting string turns out to be shorter than input string,
52235223
we simply copy the input and return. */
5224-
if (pad_length <= 0 || (pad_length - input_len) <= 0) {
5224+
if (pad_length < 0 || pad_length <= input_len) {
52255225
RETURN_STRINGL(input, input_len, 1);
52265226
}
52275227

0 commit comments

Comments
 (0)