Skip to content

"Variable might not be defined" false positive #14274

Closed

Description

@staabm

Bug report

should not report "Variable might not be defined"

Code snippet that reproduces the problem

https://phpstan.org/r/217eb7db-24b5-49ed-9184-35dde694ed00

Expected output

no errors

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

No response

Activity

  1. added this to the Easy fixes milestone on Mar 13, 2026
  2. added a commit that references this issue on Mar 13, 2026
    15b7ed0
  3. added a commit that references this issue on Mar 13, 2026
    06417d4
  4. phpstan-bot commented on Mar 13, 2026

    @phpstan-bot
    Contributor

    Closed via merging phpstan/phpstan-src#5216

  5. added 2 commits that reference this issue on Mar 13, 2026
    06417d4
    1492a87
  6. added a commit that references this issue on Apr 7, 2026
    8b24007
  7. github-actions commented on Apr 14, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  8. locked as resolved and limited conversation to collaborators on Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions