diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index c9be7894..5f9517e1 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -170,7 +170,9 @@ class Net_SCP { return false; } - $this->ssh->exec('scp -t ' . $remote_file, false); // -t = to + if (!$this->ssh->exec('scp -t ' . $remote_file, false)) { // -t = to + return false; + } $temp = $this->_receive(); if ($temp !== chr(0)) { @@ -239,7 +241,9 @@ class Net_SCP { return false; } - $this->ssh->exec('scp -f ' . $remote_file, false); // -f = from + if (!$this->ssh->exec('scp -f ' . $remote_file, false)) { // -f = from + return false; + } $this->_send("\0");