mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 19:54:57 +00:00
Merge branch '1.0' into 2.0
* 1.0: Fix PHP invalid index warning
This commit is contained in:
commit
d80651738f
@ -3776,7 +3776,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