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

session_decode is marked as unused, despite it's point is to populate superglobal variable #3572

Closed
ostrolucky opened this issue Jun 12, 2020 · 1 comment
Assignees
Labels

Comments

@ostrolucky
Copy link
Contributor

https://psalm.dev/r/1cad65d7fa

From https://www.php.net/manual/en/function.session-decode.php:

session_decode() decodes the serialized session data provided in $data, and populates the $_SESSION superglobal with the result. 
@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/1cad65d7fa
<?php

function takesAnInt(string $foo): void {
    session_decode($foo);
}
Psalm output (using commit 211f014):

ERROR: UnusedFunctionCall - 4:5 - The call to session_decode is not used

@weirdan weirdan added the bug label Jun 12, 2020
@weirdan weirdan self-assigned this Jun 12, 2020
weirdan added a commit to weirdan/psalm that referenced this issue Jun 12, 2020
session_decode has side effects
weirdan added a commit to weirdan/psalm that referenced this issue Jun 12, 2020
session_decode has side effects
@muglug muglug closed this as completed in a99f92a Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants