Skip to content

Commit

Permalink
Merge pull request #2 from digitalideastudio/dev
Browse files Browse the repository at this point in the history
Masked exception message
  • Loading branch information
Serhii Matrunchyk authored Jun 9, 2017
2 parents 275291f + 2524ac2 commit 8968e8f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ClamavValidator/ClamavValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ public function validateClamav($attribute, $value, $parameters)
$file = $this->getFilePath($value);
$clamavSocket = $this->getClamavSocket();

// Create a new socket instance
$socket = (new Factory())->createClient($clamavSocket);
try {
$socket = (new Factory())->createClient($clamavSocket);
} catch (\Exception $e) {
throw new Exception('Unable to initiate a virus check.');
}

// Create a new instance of the Client
$quahog = new Client($socket, 30, PHP_NORMAL_READ);
Expand Down

0 comments on commit 8968e8f

Please sign in to comment.