Fixes warning if session is not active

See issue https://github.com/silverstripe/silverstripe-framework/issues/9496
This commit is contained in:
Thomas Portelange 2020-04-27 13:51:19 +02:00 committed by GitHub
parent 28ba4f701a
commit b38c35fe90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -648,7 +648,7 @@ class Session
*/
public function regenerateSessionId()
{
if (!headers_sent()) {
if (!headers_sent() && session_status() == PHP_SESSION_ACTIVE) {
session_regenerate_id(true);
}
}