Skip to content
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

Adds missing / in directoy check #14228

Merged
merged 1 commit into from Mar 20, 2019
Merged
Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -447,7 +447,7 @@ public static function getPluginDirectory($pluginName)
return self::$pluginsToPathCache[$pluginName];
}

$corePluginsDir = PIWIK_INCLUDE_PATH . 'plugins/' . $pluginName;
$corePluginsDir = PIWIK_INCLUDE_PATH . '/plugins/' . $pluginName;
This conversation was marked as resolved by sgiehl

This comment has been minimized.

@tsteur

tsteur Mar 19, 2019
Member

maybe we to a rtrim(PIWIK_INCLUDE_PATH, '/') just in case? I think tests add for example a slash at the end to the constant but not sure.

This comment has been minimized.

@sgiehl

sgiehl Mar 19, 2019
Author Member

actually there is currently only one place, where we do a trim on PIWIK_INCLUDE_PATH:

$path = rtrim(PIWIK_INCLUDE_PATH, '/') . '/plugins/';

But there are so many more uses so, I don't think it's actually required.

This comment has been minimized.

@tsteur

tsteur Mar 19, 2019
Member

👍 looks good to merge

if (is_dir($corePluginsDir)) {
// for faster performance
self::$pluginsToPathCache[$pluginName] = self::getPluginRealPath($corePluginsDir);
ProTip! Use n and p to navigate between commits in a pull request.