Skip to content

Cannot access property on string not reported in isset #6899

@rajyan

Description

@rajyan

Bug report

Maybe a feature request.
While null coalesce reports error for Cannot access property $itsString on string., isset dosen't.

Noticed while creating phpstan/phpstan-src#1104.

Code snippet that reproduces the problem

https://phpstan.org/r/d4626f91-d5b2-4cf8-8c9d-a4d07cf6b3c6

Expected output

Cannot access property $itsString on string.

in line 7 too.

Did PHPStan help you today? Did it make you happy in any way?

Yeah, it' helping me everyday. I could notice an error occurred after applying Rector auto fix by PHPStan today :).

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