diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-12-04 03:07:31 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-12-04 03:07:31 +0300 |
commit | 2ba9409967d8716484c12aa23ad81c6097e62695 (patch) | |
tree | 68cf843a3fa807448e611a4ddb3880e7b72a6843 /core | |
parent | e4cdf5c9ba82bc6ea951805e5415bd91ec63a069 (diff) |
Fix integrity check (#12323)
Diffstat (limited to 'core')
-rw-r--r-- | core/FileIntegrity.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/FileIntegrity.php b/core/FileIntegrity.php index caf90d323c..1cf19548f2 100644 --- a/core/FileIntegrity.php +++ b/core/FileIntegrity.php @@ -170,7 +170,8 @@ class FileIntegrity $directoriesFoundButNotExpected = array(); foreach (self::getPathsToInvestigate() as $file) { - $file = substr($file, 2); // remove starting characters ./ to match format in manifest.inc.php + $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php + $file = ltrim($file, DIRECTORY_SEPARATOR); $directory = dirname($file); if(in_array($directory, $directoriesInManifest)) { @@ -208,7 +209,8 @@ class FileIntegrity if (is_dir($file)) { continue; } - $file = substr($file, 2); // remove starting characters ./ to match format in manifest.inc.php + $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php + $file = ltrim($file, DIRECTORY_SEPARATOR); if (self::isFileFromPluginNotInManifest($file, $pluginsInManifest)) { continue; |