Skip to content

Fix bug #79787 : mb_strimwidth does not trim string #5807

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

Closed
wants to merge 1 commit into from
Closed

Fix bug #79787 : mb_strimwidth does not trim string #5807

wants to merge 1 commit into from

Conversation

x-xiang
Copy link
Contributor

@x-xiang x-xiang commented Jul 4, 2020

When the string end with full-width character and its width is one greater than the desired trimming width,trimmaker is alse a half-width character, which will cause mb_strimwidth not to trim.

Affects all stable versions of PHP.

Original bug: https://bugs.php.net/bug.php?id=79787

@x-xiang x-xiang changed the title Fix bug #79787 Fix bug #79787 : mb_strimwidth does not trim string Jul 4, 2020
@carusogabriel
Copy link
Contributor

carusogabriel commented Jul 5, 2020

Affects all stable versions of PHP.

If so, you need to rebase with the PHP-7.3 branch.

@x-xiang x-xiang changed the base branch from master to PHP-7.3 July 6, 2020 03:11
@x-xiang
Copy link
Contributor Author

x-xiang commented Jul 6, 2020

Affects all stable versions of PHP.

If so, you need to rebase with the PHP-7.3 branch.

Done. @carusogabriel

@nikic
Copy link
Member

nikic commented Jul 8, 2020

This code is so hard to understand :(

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

I think the change is right.

@php-pulls php-pulls closed this in 3d5de7d Jul 8, 2020
@x-xiang
Copy link
Contributor Author

x-xiang commented Jul 8, 2020

This code is so hard to understand :(
I think the change is right.

Thanks, I really can't find a better solution. @nikic

@x-xiang x-xiang deleted the bug-79787 branch July 9, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants