diff options
author | foobar <sniper@php.net> | 2005-09-01 14:44:15 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-09-01 14:44:15 +0000 |
commit | 64cfbf539f67eaa6ee84dff5a36e93c568b09eab (patch) | |
tree | 66c4de5979b9512732b265e05a5e839c5bd3d5ba /main/php_ini.c | |
parent | 248c30dad75d8ab3700eade2f9e18ff408faba26 (diff) | |
download | php-git-64cfbf539f67eaa6ee84dff5a36e93c568b09eab.tar.gz |
MFH: - Fixed bug #34307 (OnUpdateStringUnempty INI options can be set empty)
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index 3745cb4dc0..a86dd8ac52 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -163,16 +163,6 @@ PHPAPI void display_ini_entries(zend_module_entry *module) # endif #endif -/* {{{ pvalue_config_destructor - */ -static void pvalue_config_destructor(zval *pvalue) -{ - if (Z_TYPE_P(pvalue) == IS_STRING) { - free(Z_STRVAL_P(pvalue)); - } -} -/* }}} */ - /* {{{ php_config_ini_parser_cb */ static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg) @@ -254,9 +244,29 @@ static void php_load_zend_extension_cb(void *arg TSRMLS_DC) } /* }}} */ +/* {{{ pvalue_config_destructor + */ +static void pvalue_config_destructor(zval *pvalue) +{ + if (Z_TYPE_P(pvalue) == IS_STRING) { + free(Z_STRVAL_P(pvalue)); + } +} +/* }}} */ + +/* {{{ php_init_config_hash + */ +int php_init_config_hash(void) +{ + if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1) == FAILURE) { + return FAILURE; + } +} +/* }}} */ + /* {{{ php_init_config */ -int php_init_config() +int php_init_config(TSRMLS_D) { char *php_ini_search_path = NULL; int safe_mode_state; @@ -269,11 +279,6 @@ int php_init_config() zend_llist scanned_ini_list; int l, total_l=0; zend_llist_element *element; - TSRMLS_FETCH(); - - if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1) == FAILURE) { - return FAILURE; - } if (sapi_module.ini_defaults) { sapi_module.ini_defaults(&configuration_hash); |