Skip to content
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

Money::stringToUnits(".99") returns 9900, not 99 #64

Closed
RossJHagan opened this issue Oct 6, 2014 · 2 comments
Closed

Money::stringToUnits(".99") returns 9900, not 99 #64

RossJHagan opened this issue Oct 6, 2014 · 2 comments

Comments

@RossJHagan
Copy link

I was going through the motions on 'what would a user do' as far as input goes that might trip up the ::stringToUnits() function.

Tested on nextrelease and master, calling Money::stringToUnits(".99") results in a value of 9900.
Personally I'd expect 99 back, maybe even an exception, but it just silently converts to 9900.

Thought it was worth mentioning even if you decide it's not a problem... thanks for the work on this!

@mathiasverraes
Copy link
Collaborator

I agree, it should fail or work. Looking into it.

@mathiasverraes
Copy link
Collaborator

Fixed in #65, merged to master and to nextrelease

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

No branches or pull requests

2 participants