#2582 closed defect (bug) (fixed)
get_users_by_letter does not work with UTF-8 letters like å, ä and ö
| Reported by: | Vincent Boiardt | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.2.5 |
| Component: | Core | Version: | |
| Severity: | Keywords: | ||
| Cc: |
Description
On row 230 you find this
if ( strlen($letter) > 1 || is_numeric($letter) || !$letter ) return false;
The function strlen returns 2 for characters like å, ä and ö. So the function will return false instead of the members, or groups, that you want.
Change History (5)
#1
in reply to: ↑ description
@
16 years ago
#2
follow-up:
↓ 3
@
16 years ago
Can we simply replace strlen() with mb_strlen()?
http://php.net/manual/en/function.mb-strlen.php
#3
in reply to: ↑ 2
@
16 years ago
...of course I meant:
if ( mb_strlen($letter, 'UTF-8') > 1 || is_numeric($letter) || !$letter ) return false;
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Replying to Vincent Boiardt:
Row 230 in bp-core-classes.php