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
added $_COOKIE to RequestSet environment #11771
Conversation
Release Piwik 3.0.2-b6
Release Piwik 3.0.2-rc1
Release Piwik 3.0.2
Release Piwik 3.0.3-b1
Release Piwik 3.0.3-b2
Release Piwik 3.0.3
Release Piwik 3.0.4-b1
Release Piwik 3.0.4-b3
Release Piwik 3.0.4-rc1
Release Piwik 3.0.4-rc2
Travis CI failes because of the setEnvironment() calls in the tests for "plugin-QueuedTracking". These errors will be fixed with another pull request for "plugin-QueuedTracking". I will link it here, once it exists. |
Hi @MichaelHeerklotz |
core/Tracker/RequestSet.php
Outdated
@@ -244,12 +244,14 @@ public function restoreEnvironment() | |||
private function resetEnvironment($env) | |||
{ | |||
$_SERVER = $env['server']; | |||
$_COOKIE = $env['cookie']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably add a check if (isset($env['cookie'])) {}
just in case it is not set for possibly still queued entries that do not have the cookie set yet. and if not set, would empty cookie to $_COOKIE
to not accidentally apply the cookie of someone else in case it is sometimes set, and sometimes not (which could happen for a short time of period)
Thank you for your feedback! |
Hi @MichaelHeerklotz |
Release Piwik 3.1.1
Release Piwik 3.2.0
Helllo @mattab patch is now updated, and I also updated the related tests. |
👍 This will fix matomo-org/plugin-QueuedTracking#51 |
Added $_COOKIE to RequestSet environment.
Plugins like "plugin-QueuedTracking" need this change, because they process requests asynchronously (not with the same PHP context).
See matomo-org/plugin-QueuedTracking#51