summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2008-01-16 08:35:59 +0000
committerAntony Dovgal <tony2001@php.net>2008-01-16 08:35:59 +0000
commitb42398f850a43297ef2f5aa95e82a56566ad29f5 (patch)
tree0f47a01918aa77cd0f2fa2c7c2ed8ca57ff124ba
parentbb084caec100aedbc40dbf74ba24685d52a906b0 (diff)
downloadphp-git-b42398f850a43297ef2f5aa95e82a56566ad29f5.tar.gz
MFH: fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251)
patch by phprus at gmail dot com
-rw-r--r--NEWS2
-rw-r--r--ext/standard/string.c2
2 files changed, 3 insertions, 1 deletions
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) {