mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Terminal: explicitly assume that fopen(stdin) will not fail
This commit is contained in:
parent
5c9419b55c
commit
2622c34542
@ -90,6 +90,7 @@ abstract class Terminal{
|
|||||||
|
|
||||||
private static function detectFormattingCodesSupport() : bool{
|
private static function detectFormattingCodesSupport() : bool{
|
||||||
$stdout = fopen("php://stdout", "w");
|
$stdout = fopen("php://stdout", "w");
|
||||||
|
if($stdout === false) throw new AssumptionFailedError("Opening php://stdout should never fail");
|
||||||
$result = (
|
$result = (
|
||||||
stream_isatty($stdout) and //STDOUT isn't being piped
|
stream_isatty($stdout) and //STDOUT isn't being piped
|
||||||
(
|
(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user