com php-src: fixed str_pad(): ext/standard/string.c

From: Date: Wed, 16 Oct 2013 10:09:43 +0000
Subject: com php-src: fixed str_pad(): ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73484@lists.php.net to get a copy of this message
Commit: d7d84804e6213d39eab25e8b83df9bfdd3d966f8 Author: Anatol Belski <ab@php.net> Wed, 21 Aug 2013 01:35:40 -0700 Parents: 12951f8bbdc624cef451eec02060e24f0f234cd6 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d7d84804e6213d39eab25e8b83df9bfdd3d966f8 Log: fixed str_pad() Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 68298d7..4930818 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5221,7 +5221,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 || (pad_length - input_len) <= 0) { + if (pad_length < 0 || pad_length <= input_len) { RETURN_STRINGL(input, input_len, 1); }

« previous php.cvs (#73484) next »