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

Don't glob() invalid files in the lang directory #563

Closed
robocoder opened this issue Feb 22, 2009 · 1 comment
Closed

Don't glob() invalid files in the lang directory #563

robocoder opened this issue Feb 22, 2009 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@robocoder
Copy link
Contributor

From [forum](http://forum.piwik.org/index.php?showtopic=238), if the lang directory contains a _vti directory, an error occurs.

This can also happen if you test Piwik from your svn working directory, and your editor leaves behind files, such as “lang/en.php~”.

```
Index: plugins/LanguagesManager/API.php
===============
- plugins/LanguagesManager/API.php (revision 906)
+ plugins/LanguagesManager/API.php (working copy)
@ -30,7 +30,7 @
return self::$languageNames;
}
$path = PIWIK_INCLUDE_PATH . “/lang/”;
- $languages = glob($path . “*”);
+ $languages = glob($path . “*.php”);
$pathLength = strlen($path);
$languageNames = array();
foreach($languages as $language)
```

@mattab
Copy link
Member

mattab commented Feb 27, 2009

committed, thanks for patch

@robocoder robocoder added this to the RobotRock milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants