aharvey                                  Thu, 09 Sep 2010 05:11:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303199

Log:
Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by
Fedora at famillecollet dot com.

Bug: http://bugs.php.net/52786 (Assigned) PHP should reset section to [PHP] 
after ini sections
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/main/php_ini.c
    U   php/php-src/trunk/main/php_ini.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-09-09 05:08:58 UTC (rev 303198)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-09-09 05:11:05 UTC (rev 303199)
@@ -18,6 +18,8 @@
 - Fixed possible crash in mssql_fetch_batch(). (Kalle)
 - Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)

+- Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
+  (Fedora at famillecollet dot com)
 - Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
   were not available). (fat)
 - Fixed bug #52745 (Binding params doesn't work when selecting a date inside a

Modified: php/php-src/branches/PHP_5_3/main/php_ini.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/php_ini.c 2010-09-09 05:08:58 UTC (rev 
303198)
+++ php/php-src/branches/PHP_5_3/main/php_ini.c 2010-09-09 05:11:05 UTC (rev 
303199)
@@ -201,6 +201,7 @@
 /* Reset / free active_ini_sectin global */
 #define RESET_ACTIVE_INI_HASH() do { \
        active_ini_hash = NULL;          \
+       is_special_section = 0;          \
 } while (0)
 /* }}} */

@@ -654,9 +655,6 @@
                zend_llist_element *element;
                int l, total_l = 0;

-               /* Reset active ini section */
-               RESET_ACTIVE_INI_HASH();
-
                if ((ndir = php_scandir(php_ini_scanned_path, &namelist, 0, 
php_alphasort)) > 0) {
                        zend_llist_init(&scanned_ini_list, sizeof(char *), 
(llist_dtor_func_t) free_estring, 1);
                        memset(&fh, 0, sizeof(fh));
@@ -668,6 +666,9 @@
                                        free(namelist[i]);
                                        continue;
                                }
+                               /* Reset active ini section */
+                               RESET_ACTIVE_INI_HASH();
+
                                if 
(IS_SLASH(php_ini_scanned_path[php_ini_scanned_path_len - 1])) {
                                        snprintf(ini_file, MAXPATHLEN, "%s%s", 
php_ini_scanned_path, namelist[i]->d_name);
                                } else {

Modified: php/php-src/trunk/main/php_ini.c
===================================================================
--- php/php-src/trunk/main/php_ini.c    2010-09-09 05:08:58 UTC (rev 303198)
+++ php/php-src/trunk/main/php_ini.c    2010-09-09 05:11:05 UTC (rev 303199)
@@ -201,6 +201,7 @@
 /* Reset / free active_ini_sectin global */
 #define RESET_ACTIVE_INI_HASH() do { \
        active_ini_hash = NULL;          \
+       is_special_section = 0;          \
 } while (0)
 /* }}} */

@@ -650,9 +651,6 @@
                zend_llist_element *element;
                int l, total_l = 0;

-               /* Reset active ini section */
-               RESET_ACTIVE_INI_HASH();
-
                if ((ndir = php_scandir(php_ini_scanned_path, &namelist, 0, 
php_alphasort)) > 0) {
                        zend_llist_init(&scanned_ini_list, sizeof(char *), 
(llist_dtor_func_t) free_estring, 1);
                        memset(&fh, 0, sizeof(fh));
@@ -664,6 +662,9 @@
                                        free(namelist[i]);
                                        continue;
                                }
+                               /* Reset active ini section */
+                               RESET_ACTIVE_INI_HASH();
+
                                if 
(IS_SLASH(php_ini_scanned_path[php_ini_scanned_path_len - 1])) {
                                        snprintf(ini_file, MAXPATHLEN, "%s%s", 
php_ini_scanned_path, namelist[i]->d_name);
                                } else {

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

Reply via email to