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

Incorrect UnusedFunctionCall on bindtextdomain function #5736

Closed
vjik opened this issue May 8, 2021 · 2 comments · Fixed by #6131
Closed

Incorrect UnusedFunctionCall on bindtextdomain function #5736

vjik opened this issue May 8, 2021 · 2 comments · Fixed by #6131
Labels
easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap

Comments

@vjik
Copy link
Contributor

vjik commented May 8, 2021

https://psalm.dev/r/350fbcf692

If second parameter of function bindtextdomain is string then function work as setter and do not should be UnusedFunctionCall.

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/350fbcf692
<?php

bindtextdomain('xxx', '//test/x');
Psalm output (using commit fe190c2):

ERROR: UnusedFunctionCall - 3:1 - The call to bindtextdomain is not used

@orklah
Copy link
Collaborator

orklah commented Jun 12, 2021

bindtextdomain is considered pure by psalm and this is not true.

You can fix that by adding the function in this list of unpure functions:

public function isCallMapFunctionPure(

@orklah orklah added easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap labels Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants