summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2018-11-06 14:13:31 +0100
committerUrban Müller2018-11-06 14:13:31 +0100
commit8d4cff2539ff117d5ea4616b27ef7de2aa400bd4 (patch)
tree436dae266fcc25573e9bdd6251bfd9cbd7dc2a23 /it.class
parenta70fb2d898fd9934b0a6daeba3aa13d04105d77c (diff)
downloaditools-8d4cff2539ff117d5ea4616b27ef7de2aa400bd4.tar.gz
itools-8d4cff2539ff117d5ea4616b27ef7de2aa400bd4.tar.bz2
itools-8d4cff2539ff117d5ea4616b27ef7de2aa400bd4.zip
::fatal should not send mail if only stdout is not a tty, ::bail adds newlines
Diffstat (limited to 'it.class')
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index 9ff426e..4f6514a 100644
--- a/it.class
+++ b/it.class
@@ -201,7 +201,7 @@ static function error($p = array())
return;
}
- $toscreen = getenv('NOERRORMAILS') || ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel');
+ $toscreen = getenv('NOERRORMAILS') || ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDERR)) || EDC('astwin') || EDC('asdevel');
if ($toscreen && !it::is_live())
$GLOBALS['debug_noredir'] = 1;
@@ -318,9 +318,9 @@ static function fatal($p)
/**
* Print message to stderr and exit with error code
*/
-static function bail($message = "Bailed.\n")
+static function bail($message = "Bailed.")
{
- fputs(STDERR, $message);
+ fputs(STDERR, rtrim($message, "\n") . "\n");
exit(1);
}