diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/info.c | 12 |
1 files 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("</pre>"); + } else { + PUTS(Z_STRVAL_P(tmp3)); } + zval_ptr_dtor(&tmp3); + } else if (Z_TYPE_PP(tmp) != IS_STRING) { tmp2 = **tmp; zval_copy_ctor(&tmp2); |
