summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-04-16 21:44:50 +0300
committerDmitry Stogov <dmitry@zend.com>2015-04-16 21:44:50 +0300
commite44ccde39a17cd316f3ab7fbf142d8d72546df68 (patch)
tree26b3e1d785aafdb9f510c79c0699ab9b73d59a16 /ext/pcre/php_pcre.c
parent3159a967d89bf9bdffcda47e0bcb5e0bfb609d6e (diff)
downloadphp-git-e44ccde39a17cd316f3ab7fbf142d8d72546df68.tar.gz
"C" is the default locale
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 117d288bb7..4c29905d2f 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -262,7 +262,13 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
if (pce->locale == BG(locale_string) ||
(pce->locale && BG(locale_string) &&
pce->locale->len == BG(locale_string)->len &&
- !memcmp(pce->locale->val, BG(locale_string)->val, pce->locale->len))) {
+ !memcmp(pce->locale->val, BG(locale_string)->val, pce->locale->len)) ||
+ (!pce->locale &&
+ BG(locale_string)->len == 1 &&
+ BG(locale_string)->val[0] == 'C') ||
+ (!BG(locale_string) &&
+ pce->locale->len == 1 &&
+ pce->locale->val[0] == 'C')) {
return pce;
}
#else