Commit:    4e46a873923b9a608cd2cdcef98ec7faad749d0e
Author:    Anatol Belski <a...@php.net>         Mon, 4 Mar 2013 09:14:14 +0100
Parents:   2578f7bcc05c3a304599e978df3900323d3b1b70 
b6fdb60ecf33b3d549d5d69e245b04d68ab3e824
Branches:  PHP-5.4 PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=4e46a873923b9a608cd2cdcef98ec7faad749d0e

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed PCRE locale crash in Windows/TS

Changed paths:
  MM  ext/pcre/php_pcre.c


Diff:
diff --cc ext/pcre/php_pcre.c
index b74b812,cab3a4c..20fb2a2
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@@ -248,8 -248,14 +248,15 @@@ PHPAPI pcre_cache_entry* pcre_get_compi
  #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) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to