Skip to content

languages.inc: get_installed_system_locales: Only strip suffix - #1655

Merged
cpeel merged 1 commit into
DistributedProofreaders:masterfrom
bpfoley:level-7-strip-suffix
Sep 29, 2026
Merged

cpeel merged 1 commit into
DistributedProofreaders:masterfrom
bpfoley:level-7-strip-suffix

Conversation

@bpfoley

@bpfoley bpfoley commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

This is both a correctness fix (it would do the wrong thing for, eg, 'foo.utf8.bar.utf8'), and quells a PHPStan level 7 warning (PHPStan can't see that strpos() must return int because it's inside a block with str_ends_with('.utf8') as a precondition.)

This is both a correctness fix (it would do the wrong thing for,
eg, 'foo.utf8.bar.utf8'), and quells a PHPStan level 7 warning
(PHPStan can't see that `strpos()` must return `int` because it's
inside a block with `str_ends_with('.utf8')` as a precondition.)
@cpeel
cpeel merged commit 8f48542 into DistributedProofreaders:master Sep 29, 2026
12 checks passed
@bpfoley
bpfoley deleted the level-7-strip-suffix branch September 29, 2026 21:52
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

Successfully merging this pull request may close these issues.

2 participants