]> granicus.if.org Git - php/commitdiff
Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by
authorAdam Harvey <aharvey@php.net>
Thu, 9 Sep 2010 05:11:05 +0000 (05:11 +0000)
committerAdam Harvey <aharvey@php.net>
Thu, 9 Sep 2010 05:11:05 +0000 (05:11 +0000)
Fedora at famillecollet dot com.

NEWS
main/php_ini.c

diff --git a/NEWS b/NEWS
index d807acffb5c2f42e9b1dc196352876324df6a47c..9cba2bdb639d12ec85e66461ff55a95f156b1c51 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index de22d32f8045eb97592b63e45f4b74255f68b311..cc24c4367ae43b888c8043a7f1c9b81144ef6d3b 100644 (file)
@@ -201,6 +201,7 @@ PHPAPI void config_zval_dtor(zval *zvalue)
 /* 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 @@ int php_init_config(TSRMLS_D)
                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 @@ int php_init_config(TSRMLS_D)
                                        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 {