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

Only set requests in tracking request set when correct value is given #17877

Merged
merged 1 commit into from Aug 22, 2021

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 11, 2021

refs matomo-org/plugin-QueuedTracking#153 (comment)

fix matomo-org/plugin-QueuedTracking#153

Possible warning:

/usr/share/piwik/core/Tracker/RequestSet.php(36): Warning - Invalid argument supplied for foreach() -

Not sure how this would happen and it might hide an actual error maybe. I've been looking through code for a while and couldn't really see where this might happen. The only one I could find was bulk tracking a wrong JSON being set. Maybe we should throw an invalid tracking parameter exception when requests is not an array? https://github.com/matomo-org/matomo/blob/4.4.1/plugins/BulkTracking/Tracker/Requests.php#L78

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

refs matomo-org/plugin-QueuedTracking#153 (comment)

Possible warning:

>  /usr/share/piwik/core/Tracker/RequestSet.php(36): Warning - Invalid argument supplied for foreach() -

Not sure how this would happen and it might hide an actual error maybe. I've been looking through code for a while and couldn't really see where this might happen.  The only one I could find was bulk tracking a wrong JSON being set. Maybe we should throw an invalid tracking parameter exception when `requests` is not an array? https://github.com/matomo-org/matomo/blob/4.4.1/plugins/BulkTracking/Tracker/Requests.php#L78
@tsteur tsteur marked this pull request as draft August 11, 2021 22:37
@tsteur tsteur marked this pull request as ready for review August 19, 2021 20:13
@tsteur tsteur added the Needs Review PRs that need a code review label Aug 19, 2021
@tsteur tsteur added this to the 4.5.0 milestone Aug 19, 2021
@tsteur
Copy link
Member Author

tsteur commented Aug 19, 2021

User confirmed it works so far.

@tsteur tsteur merged commit 7a647c5 into 4.x-dev Aug 22, 2021
@tsteur tsteur deleted the mq153 branch August 22, 2021 20:34
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Second queue is growing forever
2 participants