Skip to content

mb_detect_order without arguments never returns bool #8922

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

Open
InvisibleSmiley opened this issue Feb 20, 2023 · 0 comments · May be fixed by phpstan/phpstan-src#4020
Open

mb_detect_order without arguments never returns bool #8922

InvisibleSmiley opened this issue Feb 20, 2023 · 0 comments · May be fixed by phpstan/phpstan-src#4020

Comments

@InvisibleSmiley
Copy link

Feature request

PHPStan should infer the type that mb_detect_order returns from the given parameters.

https://www.php.net/manual/en/function.mb-detect-order.php

When setting the encoding detection order, true is returned on success or false on failure.

When getting the encoding detection order, an ordered array of the encodings is returned.

FTR I first reported this as issue #8921 and find that the automatic bot reaction is very rude. I feel this is a good example how to needlessly repel users who just want to report a problem and are not 100% familiar with the way you handle things here. The template "Function signature mismatch" includes only a comment so I guess there is no way to produce anything but an issue that gets closed automatically by the bot. Very bad UX. I hope this is now the correct way to report the issue.

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

Successfully merging a pull request may close this issue.

2 participants