diff options
author | Urban Müller | 2024-04-03 15:37:38 +0200 |
---|---|---|
committer | Urban Müller | 2024-04-03 15:37:45 +0200 |
commit | 57ef029c8b8e9892dcc891e6783e38c878aa5b1b (patch) | |
tree | c426a1449bf5f2e1a48ad1c7d6457896ad12b7bb | |
parent | bf8878eb5c98b4e3966a7a086bf51f822181b711 (diff) | |
download | itools-57ef029c8b8e9892dcc891e6783e38c878aa5b1b.tar.gz itools-57ef029c8b8e9892dcc891e6783e38c878aa5b1b.tar.bz2 itools-57ef029c8b8e9892dcc891e6783e38c878aa5b1b.zip |
no need for $reqbody if $_POST is present
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ static function error($p = array(), $extra = null) $trace = $p['trace'] ?: array_slice(debug_backtrace(0), $p['backtraceskip']); $mediumstack = it_debug::backtrace(['trace' => $trace, 'format' => "medium"]); $longstack = substr(it_debug::backtrace(['trace' => $trace, 'format' => "long"]), 0, 200000); # use substr() because data might be binary - $reqbody = it::file_get_contents("php://input"); + $reqbody = $_POST ? "" : it::file_get_contents("php://input"); $body .= ($traceline and $t = it::exec('grep -h {0} `ls 2>/dev/null {1}/log/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $traceline, $home)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : ""; $body .= $mediumstack ? "Stack:\n " . it::replace(["\n" => "\n "], $mediumstack) . "\n" : ""; |