php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62964
Patch use_php_info_print_html_esc revision 2012-09-14 05:56 UTC by david at nnucomputerwhiz dot com

Patch use_php_info_print_html_esc for *General Issues Bug #62964

Patch version 2012-09-14 05:56 UTC

Return to Bug #62964 | Download this patch
Patch Revisions:

Developer: david@nnucomputerwhiz.com

diff --git a/ext/standard/info.c b/ext/standard/info.c
index beb1477..c4200fa 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -117,7 +117,11 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC
 			zend_hash_internal_pointer_reset_ex(ht, &pos);
 			while (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING)
 			{
-				php_info_print(key);
+				if (!sapi_module.phpinfo_as_text) {
+					php_info_print_html_esc(key, len-1);
+				} else {
+					php_info_print(key);
+				}
 				zend_hash_move_forward_ex(ht, &pos);
 				if (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING) {
 					php_info_print(", ");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC