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
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

Copy path View file
@@ -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.

Copy link
@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.

Copy link
@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.

Copy link
@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.
You can’t perform that action at this time.