Skip to content

Commit

Permalink
Fixed PHPDoc for virusCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
lfarrell committed Nov 20, 2012
1 parent 517e27f commit 38ea708
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protected/commands/virusCheckCommand.php
Expand Up @@ -72,7 +72,6 @@ public function virusScan($file_path, $file_id) {

$output['path'] = $file_path;
$output['file_id'] = $file_id;

return $output;
}

Expand All @@ -91,7 +90,7 @@ protected function cleanString($string) {
* $output returned as an array with fields in a fairly predictable order
* [2] is set to total infected files on failed scan attempt
* [3] is set to total infected files on successful scan attempt
* [3] is set to total errors on failed scan attempt
* [3] is to to error total on failed scan
* Can't get actual error message out of $output
* Hence combination of scan_time and error detected to determine if it's one file or the whole system
* @param array $output
Expand All @@ -100,6 +99,7 @@ protected function cleanString($string) {
*/
protected function scanOutput(array $output) {
if(preg_match('/^Total\serrors/i', $output[3])) {
// $output['infected'] = $this->cleanString($output[2]);
$output['errors'] = $this->cleanString($output[3]);
}

Expand All @@ -114,7 +114,7 @@ protected function scanOutput(array $output) {
if(!isset($output['errors']) && !isset($output['scan_time']) && !empty($output)) {
$output['infected'] = $this->cleanString($output[3]);
}

return $output;
}

Expand Down

0 comments on commit 38ea708

Please sign in to comment.