🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

nullCoalesce.offset and isset.offset report an error on an array offset that can be null #13488

Description

@eigan

Bug report

Follow up on #11708 which didnt solve all the cases in the comments.

Code snippet that reproduces the problem

https://phpstan.org/r/2b9a0f2b-978d-4125-a91d-acb32df3f99e

Expected output

PHPStan should not memorize $randomString to be set after using ?? null. The isset() checks are wrongly reprted as unnecessary as revealed in this snippet: https://3v4l.org/nhWm3

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

PHPStan is fantastic 🎉 ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions