diff options
| author | Jakub Zelenka <bukka@php.net> | 2014-12-27 19:43:16 +0000 |
|---|---|---|
| committer | Jakub Zelenka <bukka@php.net> | 2014-12-27 19:43:16 +0000 |
| commit | 8c4c16d1c2cb983d7982409bf604ed1432aa96ac (patch) | |
| tree | e963e322bb47ceb1a0f64c8329197b99bc6d3cef /ext/pcre/php_pcre.c | |
| parent | b68da91d52801fb2cc4d2a4a44c859ea5b6c622b (diff) | |
| parent | 107ae86ca6baf2b79d8ddb32b54676a28269ba1f (diff) | |
| download | php-git-8c4c16d1c2cb983d7982409bf604ed1432aa96ac.tar.gz | |
Merge branch 'master' into jsond
Diffstat (limited to 'ext/pcre/php_pcre.c')
| -rw-r--r-- | ext/pcre/php_pcre.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index d3eb4d49fe..5701ae1a0c 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -439,7 +439,11 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) new_entry.preg_options = poptions; new_entry.compile_options = coptions; #if HAVE_SETLOCALE - new_entry.locale = BG(locale_string) ? zend_string_dup(BG(locale_string), 1) : NULL; + new_entry.locale = BG(locale_string) ? + ((GC_FLAGS(BG(locale_string)) & IS_STR_PERSISTENT) ? + zend_string_copy(BG(locale_string)) : + zend_string_init(BG(locale_string)->val, BG(locale_string)->len, 1)) : + NULL; new_entry.tables = tables; #endif |
