From: Antony Dovgal Date: Wed, 16 Jan 2008 08:35:59 +0000 (+0000) Subject: MFH: fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251) X-Git-Tag: php-5.2.6RC1~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b42398f850a43297ef2f5aa95e82a56566ad29f5;p=php MFH: fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251) patch by phprus at gmail dot com --- diff --git a/NEWS b/NEWS index acee9bce40..6ee27106ee 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS - Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter) (Greg) +- Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251). + (phprus at gmail dot com, Tony) - Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file headers). (Greg) - Fixed bug #43703 (Signature compatibility check broken). (Dmitry) diff --git a/ext/standard/string.c b/ext/standard/string.c index db576e4eba..8f137e950b 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5133,7 +5133,7 @@ PHP_FUNCTION(str_word_count) while (p < e) { s = p; - while (p < e && (isalpha(*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) { + while (p < e && (isalpha((unsigned char)*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) { p++; } if (p > s) {