mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-29 01:58:37 +00:00
SCP: do $var === false vs !$var
This commit is contained in:
parent
74ee25bf8a
commit
68c3eef88f
@ -283,6 +283,13 @@ class Net_SCP
|
|||||||
$content = '';
|
$content = '';
|
||||||
while ($size < $info['size']) {
|
while ($size < $info['size']) {
|
||||||
$data = $this->_receive();
|
$data = $this->_receive();
|
||||||
|
|
||||||
|
// Terminate the loop in case the server repeatedly sends an empty response
|
||||||
|
if ($data === false) {
|
||||||
|
user_error('No data received from server', E_USER_NOTICE);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// SCP usually seems to split stuff out into 16k chunks
|
// SCP usually seems to split stuff out into 16k chunks
|
||||||
$size+= strlen($data);
|
$size+= strlen($data);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user