@tsteur opened this Pull Request on June 9th 2020 Member

fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies

refs https://github.com/matomo-org/wp-matomo/pull/304

Adding this to 3.X as needed for Matomo for WordPress.

The removed code should actually not be needed as we added a while ago session_status() to correctly check if a session is already active or not. SID constant is not reliable.

In this case problem was this https://3v4l.org/bpUFK

Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session.

SID is not reliable for this purpose and be better to rely on session_status() which we added a while back

This Pull Request was closed on June 10th 2020
Powered by GitHub Issue Mirror