From: Stanislav Malyshev Date: Fri, 10 Apr 2009 16:55:51 +0000 (+0000) Subject: isync with 5 branch X-Git-Tag: php-5.4.0alpha1~191^2~3936 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9357998475ab121a5c420879f8e0f9de32be1655;p=php isync with 5 branch --- diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 995495e058..9a53afa72e 100755 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -542,7 +542,7 @@ PHP_FUNCTION(grapheme_substr) length += iter_val; } - if ( UBRK_DONE == sub_str_end_pos ) { + if ( UBRK_DONE == sub_str_end_pos && length < 0) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_substr: length not contained in string", 1 TSRMLS_CC );