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

Fix plugin update might be shown several times #9234

Merged
merged 1 commit into from Nov 18, 2015
Merged

Fix plugin update might be shown several times #9234

merged 1 commit into from Nov 18, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Nov 18, 2015

fixes #6737

I just ran into this issue and debugged it. Problem was the reference as there is another loop like

foreach ($pluginsHavingUpdate as &$updatePlugin) {
}
foreach ($pluginsHavingUpdate as $updatePlugin) {
}

Another solution would have been to use as $updatePlugin2 in second loop but references should be avoided in general where possible.

After changing it the plugin update was no longer shown twice

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Nov 18, 2015
@tsteur tsteur added this to the 2.15.1 milestone Nov 18, 2015
@sgiehl
Copy link
Member

sgiehl commented Nov 18, 2015

good find 👍
Do you know how that issue could be reproduced (without your changes). I'm not able to so, so it's hard to check if it's fixed

mattab pushed a commit that referenced this pull request Nov 18, 2015
Fix plugin update might be shown several times
@mattab mattab merged commit b41800e into master Nov 18, 2015
@mattab mattab deleted the 6737 branch November 18, 2015 23:44
@mattab
Copy link
Member

mattab commented Nov 18, 2015

oops I didn't mean to merge this Pull request, but it LGTM as well

@tsteur
Copy link
Member Author

tsteur commented Nov 19, 2015

You can reproduce it if you have many plugin updates.

To reproduce: Have eg 1 regular plugin update followed by a plugin update for a disabled plugin. It will try to remove the disabled plugin but then it gets replaced by the last reference.

pluginsHavingUpdate = array(array(...queuedtracking...), array(...treemapvisualization...)). Say tracking plugin is enabled, treemap plugin is disabled, then you should be able to reproduce

@sgiehl
Copy link
Member

sgiehl commented Nov 19, 2015

Ok. now I was able to reproduce. Works with the changes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review 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

3 participants