Don't crash if /dev/tty is missing
This commit is contained in:
parent
e551e74741
commit
fa95ccea23
1 changed files with 4 additions and 2 deletions
|
@ -82,8 +82,10 @@ class LogConsole extends Extension
|
|||
}
|
||||
if (!defined("UNITTEST") && PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
|
||||
$fp = fopen("/dev/tty", "w");
|
||||
fwrite($fp, $str);
|
||||
fclose($fp);
|
||||
if($fp) {
|
||||
fwrite($fp, $str);
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue