New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim any possible directory seperator in integrity check #12383

Merged
merged 1 commit into from Jan 12, 2018
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

View
@@ -171,7 +171,7 @@ protected static function getDirectoriesFoundButNotExpected()
foreach (self::getPathsToInvestigate() as $file) {
$file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
$file = ltrim($file, DIRECTORY_SEPARATOR);
$file = ltrim($file, "\\/");
$directory = dirname($file);
if(in_array($directory, $directoriesInManifest)) {
@@ -210,7 +210,7 @@ protected static function getFilesFoundButNotExpected()
continue;
}
$file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
$file = ltrim($file, DIRECTORY_SEPARATOR);
$file = ltrim($file, "\\/");
if (self::isFileFromPluginNotInManifest($file, $pluginsInManifest)) {
continue;
ProTip! Use n and p to navigate between commits in a pull request.