Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2582 closed defect (bug) (fixed)

get_users_by_letter does not work with UTF-8 letters like å, ä and ö

Reported by: vincent-boiardt's profile Vincent Boiardt Owned by:
Milestone: 1.2.5 Priority: critical
Severity: Version:
Component: Core 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 @Vincent Boiardt
15 years ago

Replying to Vincent Boiardt:

On row 230 you find this

Row 230 in bp-core-classes.php

#2 follow-up: @johnleblanc
15 years ago

Can we simply replace strlen() with mb_strlen()?
http://php.net/manual/en/function.mb-strlen.php

#3 in reply to: ↑ 2 @johnleblanc
15 years ago

...of course I meant:

if ( mb_strlen($letter, 'UTF-8') > 1 || is_numeric($letter) || !$letter )
	return false;

#4 @johnjamesjacoby
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3180]) Fixes #2582 props Vincent Boiardt

#5 @Vincent Boiardt
14 years ago

The same fix should be done in bp-groups-classes.php on row 508

Note: See TracTickets for help on using tickets.