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

Backtick operator does not mark variable as used #6367

Closed
danog opened this issue Aug 26, 2021 · 1 comment · Fixed by #6376
Closed

Backtick operator does not mark variable as used #6367

danog opened this issue Aug 26, 2021 · 1 comment · Fixed by #6376
Labels

Comments

@danog
Copy link
Collaborator

danog commented Aug 26, 2021

https://psalm.dev/r/580997aa9a

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/580997aa9a
<?php
$used = 'echo';
`$used`;

$used = 'echo';
shell_exec($used);
Psalm output (using commit 9222b24):

ERROR: ForbiddenCode - 3:1 - Use of shell_exec

ERROR: ForbiddenCode - 6:1 - Unsafe shell_exec

INFO: UnusedVariable - 2:1 - $used is never referenced or the value is not used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants