Permalink
Browse files

fix phpinfo() & php -i

  • Loading branch information...
1 parent c21f2b7 commit b5c97d8dabc0dcfe0a1a42a6245c13b486ba7d86 Marcus Boerger committed Mar 29, 2003
Showing with 5 additions and 5 deletions.
  1. +5 −5 main/php_ini.c
View
@@ -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 = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>") - 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 = "<i>no value</i>";
display_string_length = sizeof("<i>no value</i>") - 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("<tr>");
PUTS("<td class=\"e\">");
PHPWRITE(ini_entry->name, ini_entry->name_length - 1);

0 comments on commit b5c97d8

Please sign in to comment.