Merge pull request #171 from Mibew/nav666-patch-1

Try to initialize session only once
This commit is contained in:
Fedor A. Fetisov 2016-08-09 18:01:02 +03:00 committed by GitHub
commit a2774b8fb9

View File

@ -59,8 +59,18 @@ if ($tmp_request->isSecure()) {
// Remove temporary request to keep global scope clean.
unset($tmp_request);
// Initialize user session
session_start();
if (version_compare(phpversion(), '5.4.0', '<')) {
if(session_id() == '') {
session_start();
}
}
else
{
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
}
if (function_exists("date_default_timezone_set")) {
$timezone = !empty($configs['timezone'])