From b75413e3c46651f879a7b148de4cce96cf82774c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 18 May 2018 16:46:13 +0100 Subject: [PATCH] CommandReader: Use stream_isatty() instead of posix_isatty() (new in 7.2) --- src/pocketmine/command/CommandReader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/command/CommandReader.php b/src/pocketmine/command/CommandReader.php index 752eb62fd..c0a1f0050 100644 --- a/src/pocketmine/command/CommandReader.php +++ b/src/pocketmine/command/CommandReader.php @@ -96,7 +96,7 @@ class CommandReader extends Thread{ * @return bool */ private function isPipe($stream) : bool{ - return is_resource($stream) and ((function_exists("posix_isatty") and !posix_isatty($stream)) or ((fstat($stream)["mode"] & 0170000) === 0010000)); + return is_resource($stream) and (!stream_isatty($stream) or ((fstat($stream)["mode"] & 0170000) === 0010000)); } /**