summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2018-06-27 15:16:23 +0200
committerUrban Müller2018-06-27 15:16:23 +0200
commit7ca82e48242ebb861a522687fb258d2e1b3d2d5e (patch)
treefdbff0d37eb55eec661e6f8f527f3b268131dcfa
parent84fe0c2eaa7deb0681cfc8746434044a2fae53c6 (diff)
downloaditools-7ca82e48242ebb861a522687fb258d2e1b3d2d5e.tar.gz
itools-7ca82e48242ebb861a522687fb258d2e1b3d2d5e.tar.bz2
itools-7ca82e48242ebb861a522687fb258d2e1b3d2d5e.zip
dont use safer file funcs in it::error, could theoretically recurse
-rw-r--r--it.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it.class b/it.class
index 502c554..01fe916 100644
--- a/it.class
+++ b/it.class
@@ -171,7 +171,7 @@ static function error($p = array())
else
$url = $_SERVER['SCRIPT_NAME'] . " " . join(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")";
- $gods = strtr(trim(@it::file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', '));
+ $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', '));
if (!$p['to'])
unset($p['to']); # allow defaults to kick in
$p += array(
@@ -196,8 +196,8 @@ static function error($p = array())
if ($p['okstate'])
{
list($okfn, $okstatus) = explode("=", "/tmp/alertdata/okstate_" . $p['okstate']);
- $failcount = $okstatus ? 0 : (int)@it::file_get_contents($okfn) + 1;
- it::file_put_contents($okfn, "$failcount\n");
+ $failcount = $okstatus ? 0 : (int)@file_get_contents($okfn) + 1;
+ file_put_contents($okfn, "$failcount\n");
if ($failcount != $p['failcount'] && $failcount != $p['failcount'] * 2)
return;
}
@@ -247,7 +247,7 @@ static function error($p = array())
$p['body'] = is_string($p['body']) || !array_key_exists('body', $p) ? $p['body'] : var_export($p['body'], true);
if (strlen($p['body']) > 500000)
{
- it::file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']);
+ file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']);
$p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn";
}