diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-01-30 00:16:27 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-01-30 00:16:27 +0000 |
commit | a820c7c568ed95c63f634d35fb85a04a603d8e43 (patch) | |
tree | 8082521ef17b574cec340c2045191e931e01ef45 | |
parent | 09370413757acd3ac21c775134ad1249a7d43d5e (diff) | |
download | php-git-a820c7c568ed95c63f634d35fb85a04a603d8e43.tar.gz |
Improved validation checks inside str_pad()
-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); } |