Merge pull request #80 from elliotkendall/master

Cast $needle in calls to strpos/stripos to string to avoid automatic …
This commit is contained in:
Győrvári Gábor
2022-07-25 19:15:19 +02:00
committed by GitHub

View File

@@ -709,14 +709,14 @@ class MalwareScanner
//Returns true if the raw string exists in the file contents.
private function scanFunc_STR(&$pattern, &$content)
{
return strpos($content, $pattern);
return strpos($content, (string)$pattern);
}
//Performs raw string, case insensitive matching.
//Returns true if the raw string exists in the file contents, ignoring case.
private function scanFunc_STRI(&$pattern, &$content)
{
return stripos($content, $pattern);
return stripos($content, (string)$pattern);
}
//Performs regular expression matching.