Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Not correctly handling negative numbers larger than a couple of digits. #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronsaderholm
Copy link

I was running into an issue with this truncating negative numbers (negative account balances, so like credit cards, ect) which seemed to be fixed with this.

Copy link
Owner

@asgrim asgrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not take into account existing number conversions, and breaks BC (you can tell; the tests fail). This change is in the same vein as #33 which is also a BC break; we can't fix without bumping major. Regardless of that, I can't accept this patch without accompanying tests.

['', '.$1'],
$amountString
);
return floatval($amountString);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alignment wrong.

@asgrim asgrim added the invalid label Feb 21, 2017
@asgrim asgrim modified the milestone: 2.0.0 Feb 21, 2017
@aaronsaderholm
Copy link
Author

Thanks for the feedback, I will review. I suspect #33 fixed this problem (but with the proper tests) but I will try to evaluate that.

@asgrim asgrim added BC break Changes in this PR/issue would result in a BC break needs tests PR that needs tests added labels Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
BC break Changes in this PR/issue would result in a BC break invalid needs tests PR that needs tests added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants