From 6b336175a6bd057882940ec4e5c99b29c56a4b1d Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 18 Apr 2006 02:40:29 +0000 Subject: [PATCH] Fix trim("a") bug. --- ext/standard/string.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ) { -- 2.50.1