File: php-5.3.4-ini.patch

package info (click to toggle)
php5 5.3.3-7%2Bsqueeze19
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 122,836 kB
  • ctags: 55,742
  • sloc: ansic: 633,963; php: 19,620; sh: 11,344; xml: 5,816; cpp: 2,400; yacc: 1,745; exp: 1,514; makefile: 1,019; pascal: 623; awk: 537; sql: 22
file content (30 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -201,6 +201,7 @@ PHPAPI void config_zval_dtor(zval *zvalu
 /* Reset / free active_ini_sectin global */
 #define RESET_ACTIVE_INI_HASH() do { \
 	active_ini_hash = NULL;          \
+	is_special_section = 0;          \
 } while (0)
 /* }}} */
 
@@ -628,9 +629,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));
@@ -642,6 +640,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 {