From 84b03d4c3cabcd2c797c7534cebdb7bc231a98dc Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 15 Dec 2012 22:38:02 +0100 Subject: [PATCH] Suppress warnings from SSH library and only throw an exception --- frontend/classes/class.sshconnector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/classes/class.sshconnector.php b/frontend/classes/class.sshconnector.php index 0b98cda..ff4dc6d 100644 --- a/frontend/classes/class.sshconnector.php +++ b/frontend/classes/class.sshconnector.php @@ -74,11 +74,11 @@ class SshConnector extends CPHPBaseClass if(empty($this->passphrase)) { - $result = ssh2_auth_pubkey_file($this->connection, $this->user, $this->pubkey, $this->key); + $result = @ssh2_auth_pubkey_file($this->connection, $this->user, $this->pubkey, $this->key); } else { - $result = ssh2_auth_pubkey_file($this->connection, $this->user, $this->pubkey, $this->key, $this->passphrase); + $result = @ssh2_auth_pubkey_file($this->connection, $this->user, $this->pubkey, $this->key, $this->passphrase); } if($result === true)