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 explicitly call the setup() method of S3_Uploads #67

Open
fklein-lu opened this issue Nov 17, 2015 · 0 comments
Open

Don't explicitly call the setup() method of S3_Uploads #67

fklein-lu opened this issue Nov 17, 2015 · 0 comments

Comments

@fklein-lu
Copy link
Contributor

The setup() method of S3_Uploads class is called directly multiple times in the code.

The first occurrence of such a call is in s3_uploads_init(), hooked to plugins_loaded. This means that by the time that the other calls happen, the method has already been called once at least.

Since the setup() method hooks up different other methods, it should only be called once. Since S3_Uploads is a singleton, we should move the call to the method into the constructor and mark it as protected.

@joehoyle since you know the plugin best, I'd appreciate your input.

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

No branches or pull requests

1 participant