From b5c97d8dabc0dcfe0a1a42a6245c13b486ba7d86 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 29 Mar 2003 21:25:03 +0000 Subject: fix phpinfo() & php -i --- main/php_ini.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main') diff --git a/main/php_ini.c b/main/php_ini.c index 2422392f9b..9b3fe10c63 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -67,9 +67,9 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) if (ini_entry->orig_value && ini_entry->orig_value[0]) { display_string = ini_entry->orig_value; display_string_length = ini_entry->orig_value_length; - esc_html = 1; + esc_html = !sapi_module.phpinfo_as_text; } else { - if (PG(html_errors)) { + if (!sapi_module.phpinfo_as_text) { display_string = "no value"; display_string_length = sizeof("no value") - 1; } else { @@ -80,9 +80,9 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) } else if (ini_entry->value && ini_entry->value[0]) { display_string = ini_entry->value; display_string_length = ini_entry->value_length; - esc_html=1; + esc_html = !sapi_module.phpinfo_as_text; } else { - if (PG(html_errors)) { + if (!sapi_module.phpinfo_as_text) { display_string = "no value"; display_string_length = sizeof("no value") - 1; } else { @@ -107,7 +107,7 @@ static int php_ini_displayer(zend_ini_entry *ini_entry, int module_number TSRMLS if (ini_entry->module_number != module_number) { return 0; } - if (PG(html_errors)) { + if (!sapi_module.phpinfo_as_text) { PUTS(""); PUTS(""); PHPWRITE(ini_entry->name, ini_entry->name_length - 1); -- cgit v1.2.1