Site Health notices critical issue
-
Hi,
with the current version installed (
21.73
), Site Health lists a critical issue caused by this plugin.
An active PHP session was detected Performance
A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.The function
tm_get_session_id()
– which is i.e. called at theinit
hook – inlibs/functions.php
on line257
does not check, whether the request is performed in a REST context. So it probably should be something like:function tm_get_session_id() {
if (!wp_is_rest_endpoint() && !session_id()) {
session_start();
}
return session_id();
}—
The
wp_is_rest_endpoint()
seems not to fix this… Maybe you might have a better idea.Best regards,
Daniel
- You must be logged in to reply to this topic.