Skip to content

Commit

Permalink
Fix session_start if it is already running
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcs committed Jun 27, 2012
1 parent 7918103 commit 3de7ece
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/functions.php
Expand Up @@ -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();
Expand Down

2 comments on commit 3de7ece

@dimkalinux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashcs why?

@ashcs
Copy link
Member Author

@ashcs ashcs commented on 3de7ece Jun 30, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.