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

Load plugins & .DS_Store on Mac #45

Open
rakanalh opened this issue Aug 7, 2011 · 0 comments
Open

Load plugins & .DS_Store on Mac #45

rakanalh opened this issue Aug 7, 2011 · 0 comments

Comments

@rakanalh
Copy link

rakanalh commented Aug 7, 2011

Just faced this problem with the "loadPlugins" method inside phpThumb class. It was including a folder that is automatically placed inside the directory in which this class resides called ".DS_Store".
Inside the loop in which you read all the plugins you check for ".", ".." and ".svn" but i suggest checking if the current file is not a PHP file

I've modified the code in my project to be:
while (false !== ($file = readdir($handle)))
{
if(substr($file, -3) != 'php') continue;
include_once($pluginPath . '/' . $file);
}

As the previous one was causing a problem having the image to show because of the output caused by including ".DS_Store"

Hope you fix this issue in some other more flexible way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant