com php-src: "C" is the default locale: ext/pcre/php_pcre.c

From: Date: Thu, 16 Apr 2015 18:44:50 +0000
Subject: com php-src: "C" is the default locale: ext/pcre/php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86338@lists.php.net to get a copy of this message
Commit: e44ccde39a17cd316f3ab7fbf142d8d72546df68 Author: Dmitry Stogov <dmitry@zend.com> Thu, 16 Apr 2015 21:44:50 +0300 Parents: 3159a967d89bf9bdffcda47e0bcb5e0bfb609d6e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e44ccde39a17cd316f3ab7fbf142d8d72546df68 Log: "C" is the default locale Changed paths: M ext/pcre/php_pcre.c Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 117d288..4c29905 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

« previous php.cvs (#86338) next »