summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2011-08-08 06:49:17 +0000
committerXinchen Hui <laruence@php.net>2011-08-08 06:49:17 +0000
commitcaedca8dd035b91dc79c24c09294cbe10c33c6c1 (patch)
tree8190ba760b6f19cfb9f7a19efb732649173eab53
parent6ea19be48928d62dbffd3c5057671a220496c70c (diff)
downloadphp-git-caedca8dd035b91dc79c24c09294cbe10c33c6c1.tar.gz
Make codes more clearly, and make the static analyzer silent..
-rw-r--r--ext/standard/info.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 2bee7e9803..f57e4afab3 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -245,22 +245,22 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
}
} else {
tmp2 = **tmp;
- switch (Z_TYPE_PP(tmp)) {
- default:
- tmp = NULL;
- zval_copy_ctor(&tmp2);
- convert_to_string(&tmp2);
- case IS_STRING:
- if (!sapi_module.phpinfo_as_text) {
- if (Z_STRLEN(tmp2) == 0) {
- php_info_print("<i>no value</i>");
- } else {
- php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
- }
- } else {
- php_info_print(Z_STRVAL(tmp2));
- }
+ if (Z_TYPE_PP(tmp) != IS_STRING) {
+ tmp = NULL;
+ zval_copy_ctor(&tmp2);
+ convert_to_string(&tmp2);
}
+
+ if (!sapi_module.phpinfo_as_text) {
+ if (Z_STRLEN(tmp2) == 0) {
+ php_info_print("<i>no value</i>");
+ } else {
+ php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
+ }
+ } else {
+ php_info_print(Z_STRVAL(tmp2));
+ }
+
if (!tmp) {
zval_dtor(&tmp2);
}