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

Fix number trim in case of multibyte characters #72

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

Conversation

czigor
Copy link

@czigor czigor commented Nov 21, 2018

As discussed in https://www.drupal.org/project/commerce/issues/2936294, trim() only works for ASCII and does not work on multibyte utf8 characters. Let's use a preg_replace() instead.

@czigor
Copy link
Author

czigor commented Nov 30, 2018

@bojanz Added a test that fails without the fix. For this I needed a custom NumberFormatRepository, which I'm not sure how to include in the test.

@czigor
Copy link
Author

czigor commented Nov 30, 2018

The remaining test failure happens in master too.

@czigor
Copy link
Author

czigor commented Dec 3, 2018

The failing test was my bad, fixed it too.

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.

None yet

1 participant