]> git.pld-linux.org Git - packages/php4.git/blob - php4-pcre.patch
Release 72 (by relup.sh)
[packages/php4.git] / php4-pcre.patch
1 diff -ur php-4.4.9.org/ext/pcre/php_pcre.c php-4.4.9/ext/pcre/php_pcre.c
2 --- php-4.4.9.org/ext/pcre/php_pcre.c   2007-12-31 08:22:50.000000000 +0100
3 +++ php-4.4.9/ext/pcre/php_pcre.c       2012-07-02 14:17:54.974558709 +0200
4 @@ -141,6 +141,7 @@
5         int                                      regex_len;
6         int                                      do_study = 0;
7         int                                      poptions = 0;
8 +       int                             count = 0;
9         unsigned const char *tables = NULL;
10  #if HAVE_SETLOCALE
11         char                            *locale = setlocale(LC_CTYPE, NULL);
12 @@ -154,10 +155,10 @@
13         regex_len = strlen(regex);
14         if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
15                 /*
16 -                * We use a quick pcre_info() check to see whether cache is corrupted, and if it
17 +                * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
18                  * is, we flush it and compile the pattern from scratch.
19                  */
20 -               if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
21 +               if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
22                         zend_hash_clean(&PCRE_G(pcre_cache));
23                 } else {
24  #if HAVE_SETLOCALE
This page took 0.056155 seconds and 3 git commands to generate.