Skip to content

Commit

Permalink
增加登录失败提示
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanson authored Jan 17, 2020
1 parent 4ebf255 commit 5b07136
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Core/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ private function getLogin()

$data = (array) simplexml_load_string($content, 'SimpleXMLElement', LIBXML_NOCDATA);

if (isset($data['ret']) && $data['ret'] == 1203) {
throw new LoginFailedException($data['message']);
}
$this->vbot->config['server.skey'] = $data['skey'];
$this->vbot->config['server.sid'] = $data['wxsid'];
$this->vbot->config['server.uin'] = $data['wxuin'];
Expand Down

0 comments on commit 5b07136

Please sign in to comment.