From dbc10491e72545bbef9bfbf398e5d83cae0071a5 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 28 Nov 2012 08:17:57 -0600 Subject: [PATCH] Fix an E_NOTICE (thanks chubbypama!) --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index deb92e63..29a8f0f4 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1959,7 +1959,7 @@ class Net_SSH2 { while (true) { if ($mode == NET_SSH2_READ_REGEX) { preg_match($expect, $this->interactiveBuffer, $matches); - $match = $matches[0]; + $match = isset($matches[0]) ? $matches[0] : array(); } $pos = !empty($match) ? strpos($this->interactiveBuffer, $match) : false; if ($pos !== false) {