From 0c4867144a39c25f00b538077643385ba31533db Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 28 Aug 2005 01:03:41 +0000 Subject: [PATCH] - Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]) --- NEWS | 1 + ext/standard/info.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index da385f01bc..3e6dab8495 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]). (Jani) - Fixed bug #34257 (lib64 not handled correctly in ming extension). (Marcus) - Fixed bug #34221 (Compiling xmlrpc as shared fails other parts). (Jani) - Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). (Ilia) diff --git a/ext/standard/info.c b/ext/standard/info.c index 25d9aa2ad8..e8f4042eca 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -149,14 +149,16 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) php_ob_get_buffer(tmp3 TSRMLS_CC); php_end_ob_buffer(0, 0 TSRMLS_CC); - elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC); - PUTS(elem_esc); - efree(elem_esc); - zval_ptr_dtor(&tmp3); - if (!sapi_module.phpinfo_as_text) { + elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC); + PUTS(elem_esc); + efree(elem_esc); PUTS(""); + } else { + PUTS(Z_STRVAL_P(tmp3)); } + zval_ptr_dtor(&tmp3); + } else if (Z_TYPE_PP(tmp) != IS_STRING) { tmp2 = **tmp; zval_copy_ctor(&tmp2); -- 2.50.1