From acefc441be13eb03a0e15faf9af69ffc31fcbe5a Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Wed, 1 Sep 2010 03:36:09 +0000 Subject: [PATCH] - fixed a bug preventing getLastSFTPError() and getSFTPErrors() from working (thanks, f.dammassa!) git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@117 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SFTP.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 79bb9757..bbc0a1a9 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -48,7 +48,7 @@ * @author Jim Wigginton * @copyright MMIX Jim Wigginton * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: SFTP.php,v 1.22 2010-06-29 01:33:39 terrafrost Exp $ + * @version $Id: SFTP.php,v 1.23 2010-09-01 03:36:09 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -210,7 +210,7 @@ class Net_SFTP extends Net_SSH2 { * @var String * @access private */ - var $errors = array(); + var $sftp_errors = array(); /** * Default Constructor. @@ -1435,7 +1435,7 @@ class Net_SFTP extends Net_SSH2 { */ function getLastSFTPError() { - return $this->sftp_errors[count($this->sftp_errors) - 1]; + return count($this->sftp_errors) ? $this->sftp_errors[count($this->sftp_errors) - 1] : ''; } /**