Skip to content

Commit 4c13abd

Browse files
committed
Better error handling
1 parent 2154602 commit 4c13abd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ClamAV/Network.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function __construct(string $host = self::CLAMAV_HOST, int $port = self::
3737
*/
3838
protected function getSocket()
3939
{
40-
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
41-
$status = socket_connect($socket, $this->host, $this->port);
40+
$socket = @socket_create(AF_INET, SOCK_STREAM, 0);
41+
$status = @socket_connect($socket, $this->host, $this->port);
4242

4343
if(!$status) {
4444
throw new \Exception('Unable to connect to ClamAV server');

0 commit comments

Comments
 (0)