mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
fix readline crash when user presses ctrl+D
This commit is contained in:
@ -103,8 +103,7 @@ class CommandReader extends Thread{
|
||||
private function readLine() : bool{
|
||||
$line = "";
|
||||
if($this->type === self::TYPE_READLINE){
|
||||
$line = trim(readline("> "));
|
||||
if($line !== ""){
|
||||
if(($raw = readline("> ")) !== false and ($line = trim($raw)) !== ""){
|
||||
readline_add_history($line);
|
||||
}else{
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user