Skip to content

Number filter fix - #429

Closed
Ondris wants to merge 4 commits into
nette:v3.0from
Ondris:number_filter_fix
Closed

Ondris wants to merge 4 commits into
nette:v3.0from
Ondris:number_filter_fix

Conversation

@Ondris

@Ondris Ondris commented Oct 4, 2026 •

Copy link
Copy Markdown

Latte => Filters => Number: Fixed an issue with incorrect behavior when rounding numbers with a specific locale setting in number filter.

Report is here in forum https://forum.nette.org/cs/36983-filtr-number-zaokrouhlovani
The second commit standardizes the behavior when a NaN is passed. I'm not sure if this is the intended behavior.

@dg

dg commented Oct 28, 2026

Copy link
Copy Markdown
Member

Thanks! The same problem is solved by #427, which sets ROUND_HALFUP on the formatter and so also covers |bytes and patterns, without rounding twice. I've merged that one, so I'm closing this. The nan / NaN difference is left as it is for now.

@dg dg closed this Oct 28, 2026
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