phpmyadmin / phpmyadmin/motranslator
[6.x] Evaluation incorrect, returning false for 1
Open
Beginner friendly
Nobody has claimed this yet.
bug
- Dominant language
- PHP
- Stars
- 62
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
$plural = is_numeric($evaluatedPlural) ? (int) $evaluatedPlural : 0;
$evaluatedPlural should be int 1 but instead it's true coerced to 1, therefore is_numeric(true) returns false and the plural form fails to be correctly detected.
Using PHP 8.2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/Translator.php line 254 and inspect how the evaluated plural expression is handled on PHP 8.2. Reproduce the case where the evaluated value should be integer 1 but becomes true, then verify that the plural form is detected correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100