Skip to content

Check session before start? #2

Description

@diwms

Hi,
I would like to contribute to this package.
I use this package in pair with slim/framework and slim/flash packages.

In my case the problem in SessionMiddleware - i got notice from php that session is already started. It's because registering in dependency injection container slim/flash package assume that session is started and ready to work.

So, my idea is - improve a little bit SessionMiddleware by wrapping session start

- $this->session->start();
+ if ($session->isStarted() === false) { 
        $session->start();
}

What do you think? In case of approve I'll open PR with changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions