From 0178d4f56ee040329781a1b1cf4348eb17f2b56c Mon Sep 17 00:00:00 2001 From: Sokolovskyy Roman Date: Thu, 20 Jul 2017 11:01:47 +0200 Subject: [PATCH] Fix: Local variable to property Fix: Constants names --- phpseclib/Net/SSH1.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index d5dfe699..27950eee 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -547,7 +547,7 @@ class SSH1 { $this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->connectionTimeout); if (!$this->fsock) { - throw new \RuntimeException(rtrim("Cannot connect to $host. Error $errno. $errstr")); + throw new \RuntimeException(rtrim("Cannot connect to $this->host. Error $errno. $errstr")); } $this->server_identification = $init_line = fgets($this->fsock, 255); @@ -924,7 +924,7 @@ class SSH1 * @throws \RuntimeException on connection error * @access public */ - public function read($expect, $mode = self::READ__SIMPLE) + public function read($expect, $mode = self::READ_SIMPLE) { if (!($this->bitmap & self::MASK_LOGIN)) { throw new \RuntimeException('Operation disallowed prior to login()'); @@ -936,7 +936,7 @@ class SSH1 $match = $expect; while (true) { - if ($mode == self::READ__REGEX) { + if ($mode == self::READ_REGEX) { preg_match($expect, $this->interactiveBuffer, $matches); $match = isset($matches[0]) ? $matches[0] : ''; }