When a file with a virus is uploaded, the error message gives an AJAX error. The log message is:
Recoverable fatal error: Argument 3 passed to t() must be an array, string given, called in [MY_SITE]/sites/all/modules/antivirus/includes/ClamAVScanner.php on line 85 and defined in t()
I changed line #85:
drupal_set_message(t('Virus found in %file.', array('%file' => $file), 'warning'));
to
drupal_set_message(t('Virus found in %file.', array('%file' => $file)));
and the virus found message works with no errors. I'm assuming the 'error occurred while scanning..." message has the same issue.
Any suggestions as to how to fix this properly?
Comments
Comment #1
erikwebb commentedIt looks like just a misplaced parenthesis. Can you try this patch?
Comment #2
jonraedeke commentedThanks! I should have noticed that. Good catch.
The patch works for me. Technically, I guess this needs one more review for RTBC.
Comment #3
erikwebb commentedhttp://drupalcode.org/project/antivirus.git/commit/63cbba8