[buddypress-trac] [BuddyPress Trac] #6546: SQL syntax error in BP_Friends_Friendship::search_friends function

buddypress-trac noreply at wordpress.org
Thu Jul 2 12:17:11 UTC 2015


#6546: SQL syntax error in BP_Friends_Friendship::search_friends function
---------------------------------+-----------------------------
 Reporter:  rittesh.patel        |      Owner:
     Type:  defect (bug)         |     Status:  new
 Priority:  high                 |  Milestone:  Awaiting Review
Component:  Component - Friends  |    Version:  2.3.2
 Severity:  normal               |   Keywords:
---------------------------------+-----------------------------
 Error:


 {{{
 PHP message: WordPress database error You have an error in your SQL
 syntax; check the manual that corresponds to your MariaDB server version
 for the right syntax to use near ''ni%''  LIMIT 0, 10
 }}}

 there is a single `'` which is causing the error


 {{{
 SELECT DISTINCT user_id FROM wp_usermeta WHERE user_id IN (2) AND meta_key
 = 'nickname' AND meta_value LIKE 'ni%''  LIMIT 0, 10
 }}}



 From debug log, it was getting called from
 BP_Friends_Friendship::search_friends
 https://buddypress.trac.wordpress.org/browser/trunk/src/bp-friends/classes
 /class-bp-friends-friendship.php#L345

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


More information about the buddypress-trac mailing list