[log_console] silence error if we can't open the tty

This commit is contained in:
Shish 2024-02-11 21:27:38 +00:00
parent 3843930874
commit 60a6e92231

View file

@ -80,7 +80,7 @@ class LogConsole extends Extension
$str = "$str\n";
}
if (!defined("UNITTEST") && PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
$fp = fopen("/dev/tty", "w");
$fp = @fopen("/dev/tty", "w");
if ($fp) {
fwrite($fp, $str);
fclose($fp);