View | Details | Raw Unified | Return to bug 191638 | Differences between
and this patch

Collapse All | Expand All

(-)lang/php5/files/patch-ext_standard_info.c (+23 lines)
Line 0 Link Here
1
--- ext/standard/info.c.orig	2014-07-05 19:42:26.000000000 +0400
2
+++ ext/standard/info.c	2014-07-05 19:43:42.000000000 +0400
3
@@ -875,16 +875,16 @@ PHPAPI void php_print_info(int flag TSRM
4
 
5
 		php_info_print_table_start();
6
 		php_info_print_table_header(2, "Variable", "Value");
7
-		if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE) {
8
+		if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
9
 			php_info_print_table_row(2, "PHP_SELF", Z_STRVAL_PP(data));
10
 		}
11
-		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE) {
12
+		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
13
 			php_info_print_table_row(2, "PHP_AUTH_TYPE", Z_STRVAL_PP(data));
14
 		}
15
-		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE) {
16
+		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
17
 			php_info_print_table_row(2, "PHP_AUTH_USER", Z_STRVAL_PP(data));
18
 		}
19
-		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE) {
20
+		if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE && Z_TYPE_PP(data) == IS_STRING) {
21
 			php_info_print_table_row(2, "PHP_AUTH_PW", Z_STRVAL_PP(data));
22
 		}
23
 		php_print_gpcse_array(ZEND_STRL("_REQUEST") TSRMLS_CC);

Return to bug 191638