diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 354acea1..9e48c479 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -180,6 +180,11 @@ class Net_SCP return false; } + if (empty($remote_file)) { + user_error('remote_file cannot be blank', E_USER_NOTICE); + return false; + } + if (!$this->ssh->exec('scp -t ' . escapeshellarg($remote_file), false)) { // -t = to return false; }