mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
fix readline crash when user presses ctrl+D
This commit is contained in:
parent
b06ca6eb0b
commit
31f0437c96
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user