Don't crash if /dev/tty is missing
This commit is contained in:
@ -82,8 +82,10 @@ class LogConsole extends Extension
|
|||||||
}
|
}
|
||||||
if (!defined("UNITTEST") && PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
|
if (!defined("UNITTEST") && PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
|
||||||
$fp = fopen("/dev/tty", "w");
|
$fp = fopen("/dev/tty", "w");
|
||||||
fwrite($fp, $str);
|
if($fp) {
|
||||||
fclose($fp);
|
fwrite($fp, $str);
|
||||||
|
fclose($fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user