Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable in finally block #1013

Open
i582 opened this issue Jul 3, 2021 · 0 comments · May be fixed by #1170
Open

Undefined variable in finally block #1013

i582 opened this issue Jul 3, 2021 · 0 comments · May be fixed by #1170
Labels
bug Something isn't working false-positive

Comments

@i582
Copy link
Contributor

i582 commented Jul 3, 2021

Code Example

function f() {
  try {
    $a = 100;
  } catch (Exception $e) {
    echo $e->getMessage();
  } finally {
    echo $a;
  }
}

Actual Behavior

<critical> ERROR   undefined: Undefined variable: a at ...
    echo $a;
         ^^

Expected Behavior

No error.

@i582 i582 added bug Something isn't working false-positive labels Jul 3, 2021
@vajexal vajexal linked a pull request Dec 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working false-positive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant