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 From abcb67c76ccb384ea213f9c4f42a392b15b3e15e Mon Sep 17 00:00:00 2001 From: David Cox Jr Date: Wed, 16 Oct 2013 14:43:52 -0400 Subject: req. changes: cleaned up conditionals added changelog note regarding profiler updated as per styleguide --- system/libraries/Profiler.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 80130eb48..50ba1673f 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -307,10 +307,7 @@ class CI_Profiler { foreach ($_GET as $key => $val) { - if ( ! is_numeric($key)) - { - $key = "'".$key."'"; - } + is_int($key) OR $key = "'".$key."'"; $output .= '$_GET[' .$key.']   ' @@ -338,7 +335,7 @@ class CI_Profiler { ."\n" .'  '.$this->CI->lang->line('profiler_post_data')."  \n"; - if (count($_POST) === 0 AND count($_FILES) === 0) + if (count($_POST) === 0 && count($_FILES) === 0) { $output .= '
'.$this->CI->lang->line('profiler_no_post').'
'; } @@ -348,10 +345,7 @@ class CI_Profiler { foreach ($_POST as $key => $val) { - if ( ! is_numeric($key)) - { - $key = "'".$key."'"; - } + is_int($key) OR $key = "'".$key."'"; $output .= '$_POST[' .$key.']   '; @@ -370,10 +364,7 @@ class CI_Profiler { foreach ($_FILES as $key => $val) { - if ( ! is_numeric($key)) - { - $key = "'".$key."'"; - } + is_int($key) OR $key = "'".$key."'"; $output .= '$_FILES[' .$key.']   '; @@ -389,8 +380,6 @@ class CI_Profiler { $output .= "\n"; } - - return $output.''; } -- cgit v1.2.3-24-g4f1b From 0612e92461bb725835b4731a55d7f76588cd4cf9 Mon Sep 17 00:00:00 2001 From: Cristian Riffo Huez Date: Fri, 13 Dec 2013 22:09:44 -0300 Subject: Added post-increment for $count It has been added the missing post-increment for variable $count. --- system/libraries/Profiler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 50ba1673f..7c889dd96 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -278,6 +278,7 @@ class CI_Profiler { } $output .= "\n"; + $count++; } return $output; @@ -563,4 +564,4 @@ class CI_Profiler { } /* End of file Profiler.php */ -/* Location: ./system/libraries/Profiler.php */ \ No newline at end of file +/* Location: ./system/libraries/Profiler.php */ -- cgit v1.2.3-24-g4f1b From a6eae87d14efe3169156a12ad3706852ff70e2c4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 3 Jan 2014 18:25:20 +0200 Subject: [ci skip] Some spaces & docblock fixes --- system/libraries/Profiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Profiler.php') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 7c889dd96..4e556b23d 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -564,4 +564,4 @@ class CI_Profiler { } /* End of file Profiler.php */ -/* Location: ./system/libraries/Profiler.php */ +/* Location: ./system/libraries/Profiler.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b