From bc1f800a72b3cb7191f4e6f656d93173d5f0e198 Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 28 Aug 2005 01:02:54 +0000 Subject: [PATCH] - Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]) --- ext/standard/info.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c index 521fd6e111..bc84619258 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -151,14 +151,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.40.0