Bug fix for last commit

comment and empty line filters were in the wrong place
This commit is contained in:
nichogenius
2017-07-26 03:09:47 -06:00
committed by GitHub
parent 86be84e8b6
commit 1c7963149e

View File

@@ -182,13 +182,13 @@ class MalwareScanner
if (!$found) {
$patterns = $this->loadPatterns(dirname(__FILE__) . '/patterns_re.txt');
if (!$toSearch) {
continue;
}
if ($toSearch[0] === '#') {
continue;
}
foreach ($patterns as $toSearch) {
if (!$toSearch) {
continue;
}
if ($toSearch[0] === '#') {
continue;
}
if (preg_match('/' . $toSearch . '/is', $fileContent)) {
$found = true;
break;