Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

In NumberFormatter::format() check for percent if value is a string #9062

Merged
merged 3 commits into from
Oct 20, 2015

Conversation

diosmosis
Copy link
Member

In NumberFormatter::format() check for percent if value is a string only, since only strings will have a % (avoids floating point issues).

Also includes small refactor: forward arguments to formatPercent in NumberFormat::format() and remove percent check in Twig |number filter since it is redundant (NumberFormatter does the same thing).

Fixes #9049

…nly, since only strings will have a % (avoids floating point issues). Also, forward arguments to formatPercent in NumberFormat::format() and remove percent check in Twig |number filter since it is redundant (NumberFormatter does the same thing).
@diosmosis diosmosis added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Oct 20, 2015
@diosmosis diosmosis added this to the 2.15.0 milestone Oct 20, 2015
diosmosis added 2 commits October 19, 2015 20:00
… not as many deprecated classes/methods are used, and add tests for NumberFormatter::format().
diosmosis added a commit that referenced this pull request Oct 20, 2015
Fixes #9049, in NumberFormatter::format() check for percent if value is a string only, since only strings will have a % (avoids floating point issues).

Also includes some refactoring to NumberFormatter + its test.
@diosmosis diosmosis merged commit 1d00365 into master Oct 20, 2015
@diosmosis diosmosis deleted the 9049_floating_point_percent branch October 20, 2015 04:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant