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

Use of static local variable in FrontController hinders ability to test #9119

Merged
merged 1 commit into from Oct 29, 2015

Conversation

diosmosis
Copy link
Member

In FrontController::init() a static local variable is used so the FrontController will not be init-ed more than once. Unfortunately since it is static, it affects all instances of FrontController even after a test environment is destroyed and a new one created. And since it is local, there is no way for it to be reset.

This PR moves the variable to a member.

@diosmosis diosmosis added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Oct 29, 2015
@diosmosis diosmosis added this to the 2.15.1 milestone Oct 29, 2015
diosmosis added a commit that referenced this pull request Oct 29, 2015
Use of static local variable in FrontController hinders ability to test
@diosmosis diosmosis merged commit 2de7fef into master Oct 29, 2015
@diosmosis diosmosis deleted the frontcontroller_tweak branch October 29, 2015 12:32
@tsteur
Copy link
Member

tsteur commented Oct 29, 2015

Good one here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants