[buddypress-trac] [BuddyPress] #4933: Members Directory Search doesn't find O'Connor

buddypress-trac noreply at wordpress.org
Mon Apr 15 13:26:07 UTC 2013


#4933: Members Directory Search doesn't find O'Connor
--------------------------+-----------------------------
 Reporter:  dontdream     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.7
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Enter a text containing quotes, e.g. O'Connor, in the Members Directory
 search box. The answer is always "Sorry, no members were found." even if
 many members are named O'Connor.

 The bug is fixed replacing the WHERE clause in bp-core-classes.php, line
 321.
 Replace:

 WHERE value LIKE %s", '%%' . like_escape( $search_terms ) . '%%'

 with:

 WHERE value LIKE %s", '%' . mysql_real_escape_string( $search_terms ) .
 '%'

 The double % characters are replaced by single % characters, but that's
 optional, while the different escape function actually removes the bug.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4933>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list