Fix regex to work on windows and match only mailpoet folder as valid

This commit is contained in:
Tautvidas Sipavičius
2016-12-09 23:20:48 +02:00
parent 5fb699fd5b
commit eda4a9edcc

View File

@ -121,7 +121,7 @@ class RequirementsChecker {
return $this->processError($error);
}
$pattern = '#' . preg_quote(Env::$path) . '#';
$pattern = '#' . preg_quote(Env::$path) . '[\\\/]#';
$is_loaded_by_plugin = preg_match($pattern, $dependency_path);
if(!$is_loaded_by_plugin) {
$error = sprintf(