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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable13] Use mb_* string methods to extract first character for generated avatars #8470

Merged
merged 1 commit into from Feb 21, 2018

Conversation

Projects
None yet
3 participants
@MorrisJobke
Member

MorrisJobke commented Feb 21, 2018

This fixes #8451 where the first character is a non-ASCII character. The $string[0] notation only extracted one byte and thus resulting in an invalid code. The mb_strtoupper method also allows to convert characters independently from the current locale on the server.

See also http://php.net/manual/en/function.mb-strtoupper.php

Backport of #8468

Tested and works 馃憤

Use mb_* string methods to extract first character for generated avatars
This fixes #8451 where the first character is a non-ASCII character. The `$string[0]` notation only extracted one byte and thus resulting in an invalid code. The `mb_strtoupper` method also allows to convert characters independently from the current locale on the server.

See also http://php.net/manual/en/function.mb-strtoupper.php

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@codecov

This comment has been minimized.

codecov bot commented Feb 21, 2018

Codecov Report

Merging #8470 into stable13 will increase coverage by <.01%.
The diff coverage is 100%.

@@              Coverage Diff               @@
##             stable13    #8470      +/-   ##
==============================================
+ Coverage       51.23%   51.23%   +<.01%     
  Complexity      24986    24986              
==============================================
  Files            1608     1608              
  Lines           95093    95093              
  Branches         1376     1376              
==============================================
+ Hits            48720    48721       +1     
+ Misses          46373    46372       -1
Impacted Files Coverage 螖 Complexity 螖
lib/private/Avatar.php 78.01% <100%> (酶) 48 <0> (酶) 猬囷笍
apps/files_trashbin/lib/Trashbin.php 72.53% <0%> (+0.24%) 136% <0%> (酶) 猬囷笍

@rullzer rullzer merged commit 27aa076 into stable13 Feb 21, 2018

3 checks passed

codecov/patch 100% of diff hit (target 51.23%)
Details
codecov/project 51.23% (+<.01%) compared to 86be268
Details
continuous-integration/drone/pr the build was successful
Details

@rullzer rullzer deleted the 13-8468 branch Feb 21, 2018

@MorrisJobke MorrisJobke referenced this pull request Mar 9, 2018

Merged

13.0.1 RC1 #8748

10 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment