diff options
author | Urban Müller | 2018-11-06 14:13:31 +0100 |
---|---|---|
committer | Urban Müller | 2018-11-06 14:13:31 +0100 |
commit | 8d4cff2539ff117d5ea4616b27ef7de2aa400bd4 (patch) | |
tree | 436dae266fcc25573e9bdd6251bfd9cbd7dc2a23 | |
parent | a70fb2d898fd9934b0a6daeba3aa13d04105d77c (diff) | |
download | itools-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
-rw-r--r-- | it.class | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } |