Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

$session->migrate() called before session is started #7

Open
@pascal-hofmann

Description

@pascal-hofmann

I think there is some kind of conceptual error (at least when session.auto_start=0). I was trying to use Stack\Session and always got an empty session ID.

Reason is, that $session->migrate is called when no cookie is present. This leads to a call to session_regenerate_id (which fails, because no session was started yet). Afterwards NativeSessionStorage::loadSession is invoked, which sets NativeSessionStorage::$started to true.

So in the end I have a broken session (empty session id). I could fix this, by adding a $session->start() before the call to $session->migrate().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions