From 94ca5e1d0cea841d772d97d42edd5309d8449445 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 13 Jan 2013 10:49:03 -0600 Subject: [PATCH] SSH1,SSH2: strpos expects string - not array --- phpseclib/Net/SSH1.php | 2 +- phpseclib/Net/SSH2.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index daa8e227..8f5c7993 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -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) { diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 43cc0910..5c129a1a 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -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) {