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

Avoid warning headers already sent when setting session cache limiter #14979

Merged
merged 2 commits into from Oct 15, 2019

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Oct 9, 2019

Not sure this could be causing any issues?

@tsteur tsteur added the Needs Review PRs that need a code review label Oct 9, 2019
@tsteur tsteur added this to the 3.12.0 milestone Oct 9, 2019
@tsteur
Copy link
Member Author

tsteur commented Oct 15, 2019

@sgiehl or @mattab any thoughts on this? Was reading https://www.php.net/manual/en/function.session-cache-limiter.php

I understand it won't send eg the Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 .... Pragma: no-cache ... if headers were already sent. We don't really want this, but when this happens, we can't change things anymore anyway. The default is nocache see https://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter so it should all be fine even if we can't set it specifically. It would only be an issue if the script is eg embedded in WP-Matomo.

@mattab mattab merged commit aae4c72 into 3.x-dev Oct 15, 2019
@mattab mattab deleted the cachelimiterheaderssent branch October 15, 2019 22:06
@mattab
Copy link
Member

mattab commented Oct 15, 2019

Code change looks fine. just checked and this code is from 11 years ago so maybe the default changed and now it's not that important ⌚ 23ad6df

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.

None yet

2 participants