Skip to content

Commit

Permalink
small fix of login method
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilFreelancer committed Mar 3, 2019
1 parent df4e0a1 commit dac8fb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ private function login(bool $legacyRetry = false): bool
// Only tested with ROS pre 6.43, will test with post 6.43 => this could make legacy parameter obsolete?
if ($legacyRetry && $this->isLegacy($response)) {
$this->_config->set('legacy', true);
return $this->login(true);
return $this->login();
}

// Return true if we have only one line from server and this line is !done
return 1 === \count($response) || (isset($response[0]) && $response[0] === '!done');
return (1 === count($response)) && isset($response[0]) && ($response[0] === '!done');
}

/**
Expand Down

0 comments on commit dac8fb6

Please sign in to comment.