-
Notifications
You must be signed in to change notification settings - Fork 56
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
Output of Float Numbers - Rounding Not Enforced #184
Labels
Comments
I should add, the output is the same with or without the |
I found a server configuration that solved this for me after I discovered the issue did not exist when deployed to our staging server. I am running this locally via DDEV. Adding a
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I am using element-api to output JSON from Craft number fields (which are themselves limited to 1 or 2 decimal places) but for some reason, on output these are extended to 15 decimal places regardless of any PHP rounding rules I use in my controller classes.
Steps to reproduce
Additional info
Craft Pro 4.5.6.1
8.0.28
MariaDB 10.4.28
Code:
Output:
The text was updated successfully, but these errors were encountered: