From: Andrei Zmievski Date: Tue, 18 Apr 2006 02:40:29 +0000 (+0000) Subject: Fix trim("a") bug. X-Git-Tag: RELEASE_1_3~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b336175a6bd057882940ec4e5c99b29c56a4b1d;p=php Fix trim("a") bug. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 0eebf40276..82761e8186 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -724,9 +724,7 @@ static UChar *php_u_trim(UChar *c, int len, UChar *what, int what_len, zval *ret if ( u_isWhitespace(ch) == FALSE ) break; } } - if ( i < end ) { - U16_BACK_1(c, 0, i); /* U16_NEXT() post-increments 'i' */ - } + U16_BACK_1(c, 0, i); /* U16_NEXT() post-increments 'i' */ start = i; } if ( mode & 2 ) {