summaryrefslogtreecommitdiff
path: root/main/php_ini.c
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2010-09-09 05:11:05 +0000
committerAdam Harvey <aharvey@php.net>2010-09-09 05:11:05 +0000
commit02b2a288820deedc1cc43bc2a3cf2982444d8a72 (patch)
tree12ebc42d9ef7f69476c0adf3559dcdaff3e85138 /main/php_ini.c
parent6b72fef1347d8027209a6941f0ad8765a30fb129 (diff)
downloadphp-git-02b2a288820deedc1cc43bc2a3cf2982444d8a72.tar.gz
Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by
Fedora at famillecollet dot com.
Diffstat (limited to 'main/php_ini.c')
-rw-r--r--main/php_ini.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/php_ini.c b/main/php_ini.c
index 9edf62ccdc..cbbf6dc41d 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -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)
/* }}} */
@@ -650,9 +651,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));
@@ -664,6 +662,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 {