diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
| commit | 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch) | |
| tree | 41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/mbstring/mb_gpc.c | |
| parent | d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff) | |
| download | php-upstream/5.2.2.tar.gz | |
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/mbstring/mb_gpc.c')
| -rw-r--r-- | ext/mbstring/mb_gpc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 2cf57b7fc..1cae5788e 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mb_gpc.c,v 1.17.2.2 2006/01/01 12:50:08 sniper Exp $ */ +/* $Id: mb_gpc.c,v 1.17.2.2.2.3 2007/03/18 16:36:13 iliaa Exp $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H @@ -154,6 +154,8 @@ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data) info.num_from_encodings = MBSTRG(http_input_list_size); info.from_language = MBSTRG(language); + MBSTRG(illegalchars) = 0; + detected = _php_mb_encoding_handler_ex(&info, array_ptr, res TSRMLS_CC); MBSTRG(http_input_identify) = detected; @@ -206,9 +208,8 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ /* register_globals stuff * XXX: this feature is going to be deprecated? */ - if (info->force_register_globals) { - prev_rg_state = PG(register_globals); - PG(register_globals) = 1; + if (info->force_register_globals && !(prev_rg_state = PG(register_globals))) { + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "1", sizeof("1")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); } if (!res || *res == '\0') { @@ -341,11 +342,12 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ out: /* register_global stuff */ - if (info->force_register_globals) { - PG(register_globals) = prev_rg_state; + if (info->force_register_globals && !prev_rg_state) { + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "0", sizeof("0")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); } if (convd != NULL) { + MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); mbfl_buffer_converter_delete(convd); } if (val_list != NULL) { |
