Skip to content

Add JSON_PRESERVE_ZERO_FRACTION flag #63

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

Merged
merged 1 commit into from
Oct 8, 2021
Merged

Add JSON_PRESERVE_ZERO_FRACTION flag #63

merged 1 commit into from
Oct 8, 2021

Conversation

RusiPapazov
Copy link
Contributor

The native json_encode method trims trailing zeros after the decimal point, which can be a problem.

For example typed properties in PHP7.4 they can expect float (e.g. product price), but receive int, which triggers a runtime error.

@DavertMik
Copy link
Member

Thanks, I launched tests

@bozhidargyurov
Copy link

@DavertMik Do you have any plans about releasing this bugfix?

@Naktibalda Naktibalda merged commit 30ee3e0 into Codeception:master Oct 8, 2021
@Naktibalda
Copy link
Member

Released as 1.3.2

@RusiPapazov RusiPapazov deleted the patch-1 branch October 8, 2021 10:06
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.

4 participants