diff options
author | Urban Müller | 2018-06-27 15:16:23 +0200 |
---|---|---|
committer | Urban Müller | 2018-06-27 15:16:23 +0200 |
commit | 7ca82e48242ebb861a522687fb258d2e1b3d2d5e (patch) | |
tree | fdbff0d37eb55eec661e6f8f527f3b268131dcfa | |
parent | 84fe0c2eaa7deb0681cfc8746434044a2fae53c6 (diff) | |
download | itools-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.class | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"; } |