mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fixed PCRE locale crash in Windows/TS
This commit is contained in:
commit
4e46a87392
1 changed files with 8 additions and 1 deletions
|
@ -244,12 +244,19 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
|
|||
int count = 0;
|
||||
unsigned const char *tables = NULL;
|
||||
#if HAVE_SETLOCALE
|
||||
char *locale = setlocale(LC_CTYPE, NULL);
|
||||
char *locale;
|
||||
#endif
|
||||
pcre_cache_entry *pce;
|
||||
pcre_cache_entry new_entry;
|
||||
char *tmp = NULL;
|
||||
|
||||
#if HAVE_SETLOCALE
|
||||
# ifdef PHP_WIN32 && ZTS
|
||||
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
|
||||
# endif
|
||||
locale = setlocale(LC_CTYPE, NULL);
|
||||
#endif
|
||||
|
||||
/* Try to lookup the cached regex entry, and if successful, just pass
|
||||
back the compiled pattern, otherwise go on and compile it. */
|
||||
if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue