diff options
-rw-r--r-- | ext/standard/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 32b87751b3..b8d822ce45 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4816,7 +4816,7 @@ PHP_FUNCTION(str_pad) /* If resulting string turns out to be shorter than input string, we simply copy the input and return. */ - if (pad_length < 0 || num_pad_chars < 0) { + if (pad_length <= 0 || num_pad_chars <= 0) { RETURN_STRINGL(input, input_len, 1); } |