mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-27 12:55:58 +01:00
Merge branch '2.0'
* 2.0: Fix PHP invalid index warning
This commit is contained in:
commit
18cc8eb1c3
@ -3774,7 +3774,11 @@ class 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