We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With this code
function func(string $name): void { try { } catch (Throwable $e) { if ($name === 'stuff') throw $e; echo $e->getCode(); } finally { } }
I get and error for line echo $e->getCode();:
echo $e->getCode();
INFO: PossiblyUndefinedVariable - 9:14 - Possibly undefined variable $e defined in try block
Funny thing, if I remove if ($name === 'stuff') throw $e; or if I remove finally, the error disappears...
if ($name === 'stuff') throw $e;
finally
Link: https://psalm.dev/r/e9822c86ed
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php function func(string $name): void { try { } catch (Throwable $e) { if ($name === 'stuff') throw $e; echo $e->getCode(); } finally { } }
Psalm output (using commit 7c339c1): INFO: PossiblyUndefinedVariable - 8:14 - Possibly undefined variable $e defined in try block
Sorry, something went wrong.
Not reproducible anymore: https://psalm.dev/r/e9822c86ed
Psalm output (using commit 7869cb5): No issues!
Successfully merging a pull request may close this issue.
With this code
I get and error for line
echo $e->getCode();
:Funny thing, if I remove
if ($name === 'stuff') throw $e;
or if I removefinally
, the error disappears...Link: https://psalm.dev/r/e9822c86ed
The text was updated successfully, but these errors were encountered: