summaryrefslogtreecommitdiffstats
path: root/system/libraries/Profiler.php
diff options
context:
space:
mode:
authorDavid Cox Jr <DaveMC08@gmail.com>2013-09-25 07:56:10 +0200
committerDavid Cox Jr <DaveMC08@gmail.com>2013-09-25 07:56:10 +0200
commit06fa739406e5103298ca72fc67cc41f0f8c6b6f4 (patch)
tree65618719117a60984c6d5f456f5c392edd4c8d4f /system/libraries/Profiler.php
parent57ba100129c2807153d88dc4e1d423f6e6c8a9a6 (diff)
fix issue #2617
simply adds the $_FILES array to profiler output of POST data
Diffstat (limited to 'system/libraries/Profiler.php')
-rw-r--r--system/libraries/Profiler.php22
1 files changed, 21 insertions, 1 deletions
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"
.'<legend style="color:#009900;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_post_data')."&nbsp;&nbsp;</legend>\n";
- if (count($_POST) === 0)
+ if (count($_POST) === 0 AND count($_FILES) === 0)
{
$output .= '<div style="color:#009900;font-weight:normal;padding:4px 0 4px 0;">'.$this->CI->lang->line('profiler_no_post').'</div>';
}
@@ -368,9 +368,29 @@ class CI_Profiler {
$output .= "</td></tr>\n";
}
+ foreach ($_FILES as $key => $val)
+ {
+ if ( ! is_numeric($key))
+ {
+ $key = "'".$key."'";
+ }
+
+ $output .= '<tr><td style="width:50%;padding:5px;color:#000;background-color:#ddd;">&#36;_FILES['
+ .$key.']&nbsp;&nbsp; </td><td style="width:50%;padding:5px;color:#009900;font-weight:normal;background-color:#ddd;">';
+
+ if (is_array($val) OR is_object($val))
+ {
+ $output .= '<pre>'.htmlspecialchars(stripslashes(print_r($val, TRUE))).'</pre>';
+ }
+
+ $output .= "</td></tr>\n";
+ }
+
$output .= "</table>\n";
}
+
+
return $output.'</fieldset>';
}