]> granicus.if.org Git - php/commitdiff
MFH: fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251)
authorAntony Dovgal <tony2001@php.net>
Wed, 16 Jan 2008 08:35:59 +0000 (08:35 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 16 Jan 2008 08:35:59 +0000 (08:35 +0000)
patch by phprus at gmail dot com

NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index acee9bce4091ed41cf2a8441f4bcb2cbf8a29d1d..6ee27106ee125865726f3150cbd1b4a8bc427ca7 100644 (file)
--- 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)
index db576e4eba57af034c40dad2bf2d2ad00c5d2190..8f137e950b0c6dd44fc075febd5ad1d421bf388a 100644 (file)
@@ -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) {