From 2cfec78e738847f5585691d203646b945b2fced9 Mon Sep 17 00:00:00 2001 From: Alexander Obuhovich Date: Mon, 8 Jun 2015 10:10:27 +0300 Subject: [PATCH] Handle multi-dimensional array during request data printing --- xhprof_lib/templates/diff_run_header_block.phtml | 4 ++-- xhprof_lib/templates/single_run_header_block.phtml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xhprof_lib/templates/diff_run_header_block.phtml b/xhprof_lib/templates/diff_run_header_block.phtml index 044fbacd..672cf5f2 100644 --- a/xhprof_lib/templates/diff_run_header_block.phtml +++ b/xhprof_lib/templates/diff_run_header_block.phtml @@ -85,7 +85,7 @@ print('
'); } if (is_array($value)) { - $value = implode(", ", $value); + $value = nl2br(str_replace(' ', ' ', print_r($value, true))); } echo "" . $key . "" . chunk_split($value) . ""; echo ""; @@ -205,7 +205,7 @@ print('
'); } if(is_array($value)) { - $value = implode(", ", $value); + $value = nl2br(str_replace(' ', ' ', print_r($value, true))); } echo "" . $key . "" . chunk_split($value) . ""; echo ""; diff --git a/xhprof_lib/templates/single_run_header_block.phtml b/xhprof_lib/templates/single_run_header_block.phtml index e6bc8d0d..a98f531c 100644 --- a/xhprof_lib/templates/single_run_header_block.phtml +++ b/xhprof_lib/templates/single_run_header_block.phtml @@ -78,7 +78,7 @@ foreach($cookieArr as $key=>$value){ if (is_array($value)) { - $value = implode(", ", $value); + $value = nl2br(str_replace(' ', ' ', print_r($value, true))); } echo "\n"; echo "\t" . $key . "" . chunk_split($value) . "\n"; @@ -104,7 +104,7 @@ { if (is_array($value)) { - $value = implode(", ", $value); + $value = nl2br(str_replace(' ', ' ', print_r($value, true))); } echo ""; echo "" . $key . "" . $value . ""; @@ -129,7 +129,7 @@ foreach($postArr as $key=>$value){ if (is_array($value)) { - $value = implode(", ", $value); + $value = nl2br(str_replace(' ', ' ', print_r($value, true))); } echo ""; echo "" . $key . "" . $value . "";