diff options
author | Andrey Andreev <narf@devilix.net> | 2013-10-16 20:46:03 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-10-16 20:46:03 +0200 |
commit | 3d759d73d441655bbf7b441dadd87a10d6732855 (patch) | |
tree | d5211ce52fcdd2f0eba3d67e0ce36ebfd659aa3f /system | |
parent | b69cbcb6844870af6f95fd7648c8533408b12eb6 (diff) | |
parent | abcb67c76ccb384ea213f9c4f42a392b15b3e15e (diff) |
Merge pull request #2661 from DaveMC08/feature/issue_2617
fix issue #2617
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Profiler.php | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9e9e7d08d..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 .= '<tr><td style="width:50%;color:#000;background-color:#ddd;padding:5px;">$_GET[' .$key.'] </td><td style="width:50%;padding:5px;color:#cd6e00;font-weight:normal;background-color:#ddd;">' @@ -338,7 +335,7 @@ class CI_Profiler { ."\n" .'<legend style="color:#009900;"> '.$this->CI->lang->line('profiler_post_data')." </legend>\n"; - if (count($_POST) === 0) + if (count($_POST) === 0 && count($_FILES) === 0) { $output .= '<div style="color:#009900;font-weight:normal;padding:4px 0 4px 0;">'.$this->CI->lang->line('profiler_no_post').'</div>'; } @@ -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 .= '<tr><td style="width:50%;padding:5px;color:#000;background-color:#ddd;">$_POST[' .$key.'] </td><td style="width:50%;padding:5px;color:#009900;font-weight:normal;background-color:#ddd;">'; @@ -368,6 +362,21 @@ class CI_Profiler { $output .= "</td></tr>\n"; } + foreach ($_FILES as $key => $val) + { + is_int($key) OR $key = "'".$key."'"; + + $output .= '<tr><td style="width:50%;padding:5px;color:#000;background-color:#ddd;">$_FILES[' + .$key.'] </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"; } |