From 45f296f1872e7613a9dc1437046acae4eb8ed11d Mon Sep 17 00:00:00 2001 From: Lloric Mayuga Garcia Date: Sun, 21 May 2017 21:21:57 +0800 Subject: add pre tag in config and session when array --- system/libraries/Profiler.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9ea09a529..9a1a51380 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -484,13 +484,19 @@ class CI_Profiler { foreach ($this->CI->config->config as $config => $val) { + $pre = ''; + $pre_close = ''; + if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); + + $pre = '
' ;
+                                $pre_close = '
'; } $output .= '' - .$config.'  '.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."\n"; + .$config.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; @@ -516,13 +522,19 @@ class CI_Profiler { foreach ($this->CI->session->userdata() as $key => $val) { + $pre = ''; + $pre_close = ''; + if (is_array($val) OR is_object($val)) { $val = print_r($val, TRUE); + + $pre = '
' ;
+                                $pre_close = '
'; } $output .= '' - .$key.'  '.htmlspecialchars($val, ENT_QUOTES, config_item('charset'))."\n"; + .$key.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b