Skip to content

phpstan assumes _SESSION always exists #4586

@staabm

Description

@staabm

Bug report

Code snippet that reproduces the problem

I dont expect the error we get at https://phpstan.org/r/34e05837-1aa9-41f2-8a74-0d3b30f7f54d
since the super global $_SESSION is only defined after session_start() is called

see https://3v4l.org/0a8Ie vs. https://3v4l.org/GlBZ2

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions