1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-11 16:49:42 +01:00

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) {
if ($mode == NET_SSH1_READ_REGEX) {
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;
if ($pos !== false) {

View File

@ -1953,7 +1953,7 @@ class Net_SSH2 {
while (true) {
if ($mode == NET_SSH2_READ_REGEX) {
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;
if ($pos !== false) {