mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-09 23:31:00 +00:00
Merge pull request #883 from bantu/pr-876-1.0
Fix PHP invalid index warning * bantu/pr-876-1.0: Fix PHP invalid index warning
This commit is contained in:
commit
ae99173aed
@ -3880,7 +3880,11 @@ class Net_SSH2
|
||||
*/
|
||||
function getLastError()
|
||||
{
|
||||
return $this->errors[count($this->errors) - 1];
|
||||
$count = count($this->errors);
|
||||
|
||||
if ($count > 0) {
|
||||
return $this->errors[$count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user