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

[UnusedVariable] $id_number is never referenced or the value is not used #11162

Open
farhadsakhaei opened this issue Nov 21, 2024 · 1 comment

Comments

@farhadsakhaei
Copy link

farhadsakhaei commented Nov 21, 2024

Hi,

I have this code:

$id_number       = get_the_ID();
$id_number       = is_int( $id_number ) ? $id_number : 0;
$total_page_view = wp_statistics_pages( 'total', '', $id_number );

But I get this error:

[UnusedVariable] $id_number is never referenced or the value is not used

Copy link

Hey @farhadsakhaei, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

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

No branches or pull requests

1 participant