Permalink
Browse files

Fix session_start if it is already running

  • Loading branch information...
ashcs committed Jun 27, 2012
1 parent 7918103 commit 3de7ece686676bd5407228ba85728857010cabef
Showing with 6 additions and 2 deletions.
  1. +6 −2 include/functions.php
View
@@ -59,8 +59,12 @@ function forum_session_start() {
$forum_session_id = random_key(32, FALSE, TRUE);
session_id($forum_session_id);
}
-
- session_start();
+
+ if (!isset($_SESSION))
+ {
+ session_start();
+ }
+
if (!isset($_SESSION['initiated']))
{
session_regenerate_id();

2 comments on commit 3de7ece

Owner

dimkalinux replied Jun 30, 2012

@ashcs why?

Owner

ashcs replied Jun 30, 2012

http://punbb.ru/post35512.html#p35512
May be session.auto_start is enabled by default?

Please sign in to comment.