Skip to content

Commit ec83ec9

Browse files
committed
Fixing Herzult#53
Silencing warning when also having an exception when using ssh2_auth_pubkey_file() on PublicKeyFile::authenticate
1 parent 13eec7e commit ec83ec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/Ssh/Authentication/PublicKeyFile.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public function __construct($username, $publicKeyFile, $privateKeyFile, $passPhr
3737
*/
3838
public function authenticate($session)
3939
{
40-
return ssh2_auth_pubkey_file(
40+
// It may throw n exception AND a warning, see https://github.com/Herzult/php-ssh/issues/53
41+
return @ssh2_auth_pubkey_file(
4142
$session,
4243
$this->username,
4344
$this->publicKeyFile,

0 commit comments

Comments
 (0)