Skip to content

Commit

Permalink
Merge pull request BenMenking#17 from xwiz/master
Browse files Browse the repository at this point in the history
Fix Line 114 -- sometimes RESPONSE[0] is not set after read.
  • Loading branch information
BenMenking authored Oct 18, 2016
2 parents e0e17f4 + 54549a6 commit 75c0fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routeros_api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function connect($ip, $login, $password)
$this->write('=name=' . $login, false);
$this->write('=response=00' . md5(chr(0) . $password . pack('H*', $MATCHES[0][1])));
$RESPONSE = $this->read(false);
if ($RESPONSE[0] == '!done') {
if (isset($RESPONSE[0]) && $RESPONSE[0] == '!done') {
$this->connected = true;
break;
}
Expand Down

0 comments on commit 75c0fd7

Please sign in to comment.