mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-50907 antivirus_clamav: Add test coverage for scan_data.
This commit is contained in:
parent
694cb8eb21
commit
30e1797f29
2 changed files with 106 additions and 2 deletions
|
@ -88,7 +88,7 @@ class scanner extends \core\antivirus\scanner {
|
|||
/**
|
||||
* Scan data.
|
||||
*
|
||||
* @param string $data The varaible containing the data to scan.
|
||||
* @param string $data The variable containing the data to scan.
|
||||
* @return int Scanning result constant.
|
||||
*/
|
||||
public function scan_data($data) {
|
||||
|
@ -234,7 +234,7 @@ class scanner extends \core\antivirus\scanner {
|
|||
* @param string $data The varaible containing the data to scan.
|
||||
* @return int Scanning result constant.
|
||||
*/
|
||||
private function scan_data_execute_unixsocket($data) {
|
||||
public function scan_data_execute_unixsocket($data) {
|
||||
$socket = stream_socket_client('unix://' . $this->get_config('pathtounixsocket'), $errno, $errstr, ANTIVIRUS_CLAMAV_SOCKET_TIMEOUT);
|
||||
if (!$socket) {
|
||||
// Can't open socket for some reason, notify admins.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue