mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-08 14:51:00 +00:00
SFTP: fix possible E_NOTICE with put()
This commit is contained in:
parent
4b1827beab
commit
978a5d9dc0
@ -2129,8 +2129,8 @@ class SFTP extends SSH2
|
||||
$offset = $start;
|
||||
} elseif ($mode & (self::RESUME | self::RESUME_START)) {
|
||||
// if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called
|
||||
$size = $this->stat($remote_file)['size'];
|
||||
$offset = $size !== false ? $size : 0;
|
||||
$size = $this->size($remote_file);
|
||||
$offset = $size !== false ? max($size, 0) : 0;
|
||||
} else {
|
||||
$offset = 0;
|
||||
if ($this->version >= 5) {
|
||||
|
Loading…
Reference in New Issue
Block a user