This commit is contained in:
terrafrost 2015-12-05 10:27:07 -06:00
commit b5ac556213
2 changed files with 6 additions and 2 deletions

View File

@ -3880,7 +3880,11 @@ class Net_SSH2
*/ */
function getLastError() function getLastError()
{ {
return $this->errors[count($this->errors) - 1]; $count = count($this->errors);
if ($count > 0) {
return $this->errors[$count - 1];
}
} }
/** /**

View File

@ -18,7 +18,7 @@ class Unit_File_ASN1Test extends PhpseclibTestCase
$KDC_REP = array( $KDC_REP = array(
'type' => FILE_ASN1_TYPE_SEQUENCE, 'type' => FILE_ASN1_TYPE_SEQUENCE,
'children' => array( 'children' => array(
'pvno' => array( 'pvno' => array(
'constant' => 0, 'constant' => 0,
'optional' => true, 'optional' => true,
'explicit' => true, 'explicit' => true,