summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2022-01-05 16:34:53 +0100
committerUrban Müller2022-01-05 16:34:53 +0100
commit4125c47e4ce706ba07e52d3dd3285acc7c410228 (patch)
treecc71eb958c92dab422e96d63208731c426bb8828
parent97b6eb73b17260490f5aaf06d98a350470dc6b39 (diff)
downloaditools-4125c47e4ce706ba07e52d3dd3285acc7c410228.tar.gz
itools-4125c47e4ce706ba07e52d3dd3285acc7c410228.tar.bz2
itools-4125c47e4ce706ba07e52d3dd3285acc7c410228.zip
body is not necessarily utf8
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 9c29518..2b582f7 100644
--- a/it.class
+++ b/it.class
@@ -259,7 +259,7 @@ static function error($p = array(), $extra = null)
if ($toscreen || $sendmail)
{
$p['body'] = is_string($p['body']) || !array_key_exists('body', $p) ? $p['body'] : var_export($p['body'], true);
- if (strlen($p['body']) > 500000 || it::match('[\x00-\x08\x0E-\x1F]', $p['body']) !== null)
+ if (strlen($p['body']) > 500000 || it::match('[\x00-\x08\x0E-\x1F]', $p['body'], ['utf8' => false]) !== null)
{
file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']); # NOPHPLINT
$p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn";