From 06fa739406e5103298ca72fc67cc41f0f8c6b6f4 Mon Sep 17 00:00:00 2001 From: David Cox Jr Date: Wed, 25 Sep 2013 01:56:10 -0400 Subject: fix issue #2617 simply adds the $_FILES array to profiler output of POST data --- system/libraries/Profiler.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9e9e7d08d..80130eb48 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -338,7 +338,7 @@ class CI_Profiler { ."\n" .'  '.$this->CI->lang->line('profiler_post_data')."  \n"; - if (count($_POST) === 0) + if (count($_POST) === 0 AND count($_FILES) === 0) { $output .= '
'.$this->CI->lang->line('profiler_no_post').'
'; } @@ -368,9 +368,29 @@ class CI_Profiler { $output .= "\n"; } + foreach ($_FILES as $key => $val) + { + if ( ! is_numeric($key)) + { + $key = "'".$key."'"; + } + + $output .= '$_FILES[' + .$key.']   '; + + if (is_array($val) OR is_object($val)) + { + $output .= '
'.htmlspecialchars(stripslashes(print_r($val, TRUE))).'
'; + } + + $output .= "\n"; + } + $output .= "\n"; } + + return $output.''; } -- cgit v1.2.3-24-g4f1b