diff --git a/sources/Application/Helper/Session.php b/sources/Application/Helper/Session.php index c19f554632..ae800cf22b 100644 --- a/sources/Application/Helper/Session.php +++ b/sources/Application/Helper/Session.php @@ -29,7 +29,7 @@ class Session return; } - if (session_status() === PHP_SESSION_ACTIVE || headers_sent()) { + if (self::IsInitialized()) { // Session already started self::$iSessionId = session_id(); return; @@ -193,4 +193,9 @@ class Session { return print_r($_SESSION, true); } + + public static function IsInitialized(): bool + { + return session_status() === PHP_SESSION_ACTIVE || headers_sent(); + } }