SSH1,SSH2: strpos expects string - not array

This commit is contained in:
terrafrost 2013-01-13 10:49:03 -06:00
parent bccce5802c
commit 94ca5e1d0c
2 changed files with 2 additions and 2 deletions

View File

@ -886,7 +886,7 @@ class Net_SSH1 {
while (true) { while (true) {
if ($mode == NET_SSH1_READ_REGEX) { if ($mode == NET_SSH1_READ_REGEX) {
preg_match($expect, $this->interactiveBuffer, $matches); preg_match($expect, $this->interactiveBuffer, $matches);
$match = isset($matches[0]) ? $matches[0] : array(); $match = isset($matches[0]) ? $matches[0] : '';
} }
$pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false; $pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false;
if ($pos !== false) { if ($pos !== false) {

View File

@ -1953,7 +1953,7 @@ class Net_SSH2 {
while (true) { while (true) {
if ($mode == NET_SSH2_READ_REGEX) { if ($mode == NET_SSH2_READ_REGEX) {
preg_match($expect, $this->interactiveBuffer, $matches); preg_match($expect, $this->interactiveBuffer, $matches);
$match = isset($matches[0]) ? $matches[0] : array(); $match = isset($matches[0]) ? $matches[0] : '';
} }
$pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false; $pos = strlen($match) ? strpos($this->interactiveBuffer, $match) : false;
if ($pos !== false) { if ($pos !== false) {