From fad8ca58546d2a363bf41b9a80497c7b77470cd4 Mon Sep 17 00:00:00 2001 From: nav666 Date: Thu, 7 Apr 2016 02:24:01 +0300 Subject: [PATCH] Update init.php --- src/mibew/libs/init.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mibew/libs/init.php b/src/mibew/libs/init.php index 3591fe2a..374e6298 100644 --- a/src/mibew/libs/init.php +++ b/src/mibew/libs/init.php @@ -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'])