Escaped path when used in regex pattern

This commit is contained in:
Tautvidas Sipavičius
2016-12-09 22:41:44 +02:00
parent 22fd9e31f7
commit 44a77e097b

View File

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