sniper Thu Sep 1 10:44:15 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/main main.c php_ini.c php_ini.h
Log:
MFH: - Fixed bug #34307 (OnUpdateStringUnempty INI options can be set empty)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.43&r2=1.2027.2.44&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.43 php-src/NEWS:1.2027.2.44
--- php-src/NEWS:1.2027.2.43 Thu Sep 1 09:21:36 2005
+++ php-src/NEWS Thu Sep 1 10:44:13 2005
@@ -19,6 +19,7 @@
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
(Andrey)
- Fixed bug #34310 (foreach($arr as $c->d => $x) crashes). (Dmitry)
+- Fixed bug #34307 (OnUpdateStringUnempty INI options can be set empty). (Jani)
- Fixed bug #34306 (wddx_serialize_value() crashes with long array keys).
(Jani)
- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
(Derick)
http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.640.2.2&r2=1.640.2.3&ty=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.2 php-src/main/main.c:1.640.2.3
--- php-src/main/main.c:1.640.2.2 Wed Aug 17 03:54:07 2005
+++ php-src/main/main.c Thu Sep 1 10:44:14 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.2 2005/08/17 07:54:07 sniper Exp $ */
+/* $Id: main.c,v 1.640.2.3 2005/09/01 14:44:14 sniper Exp $ */
/* {{{ includes
*/
@@ -1415,17 +1415,24 @@
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index
pointer", 0);
+ /* Initialize configuration_hash */
+ if (php_init_config_hash() == FAILURE) {
+ return FAILURE;
+ }
+
+ /* Register PHP core ini entries */
+ REGISTER_INI_ENTRIES();
+
+ /* Register Zend ini entries */
+ zend_register_standard_ini_entries(TSRMLS_C);
/* this will read in php.ini, set up the configuration parameters,
load zend extensions and register php function extensions
to be loaded later */
- if (php_init_config() == FAILURE) {
+ if (php_init_config(TSRMLS_C) == FAILURE) {
return FAILURE;
}
- REGISTER_INI_ENTRIES();
- zend_register_standard_ini_entries(TSRMLS_C);
-
/* Disable realpath cache if safe_mode or open_basedir are set */
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
CWDG(realpath_cache_size_limit) = 0;
http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.136&r2=1.136.2.1&ty=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.136 php-src/main/php_ini.c:1.136.2.1
--- php-src/main/php_ini.c:1.136 Mon Aug 8 12:49:43 2005
+++ php-src/main/php_ini.c Thu Sep 1 10:44:15 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.c,v 1.136 2005/08/08 16:49:43 sniper Exp $ */
+/* $Id: php_ini.c,v 1.136.2.1 2005/09/01 14:44:15 sniper Exp $ */
#include "php.h"
#include "ext/standard/info.h"
@@ -163,16 +163,6 @@
# 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 @@
}
/* }}} */
+/* {{{ 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 @@
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);
http://cvs.php.net/diff.php/php-src/main/php_ini.h?r1=1.45&r2=1.45.2.1&ty=u
Index: php-src/main/php_ini.h
diff -u php-src/main/php_ini.h:1.45 php-src/main/php_ini.h:1.45.2.1
--- php-src/main/php_ini.h:1.45 Wed Aug 3 10:08:34 2005
+++ php-src/main/php_ini.h Thu Sep 1 10:44:15 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.h,v 1.45 2005/08/03 14:08:34 sniper Exp $ */
+/* $Id: php_ini.h,v 1.45.2.1 2005/09/01 14:44:15 sniper Exp $ */
#ifndef PHP_INI_H
#define PHP_INI_H
@@ -24,7 +24,8 @@
#include "zend_ini.h"
BEGIN_EXTERN_C()
-int php_init_config();
+int php_init_config_hash(void);
+int php_init_config(TSRMLS_D);
int php_shutdown_config(void);
void php_ini_register_extensions(TSRMLS_D);
zval *cfg_get_entry(char *name, uint name_length);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php