[wp-trac] [WordPress Trac] #10860: wpdb::escape_by_ref() is broken

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 27 16:09:09 UTC 2009


#10860: wpdb::escape_by_ref() is broken
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.8.4     
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------

Comment(by hakre):

 The question is wether or not such a function a) makes sense at all and b)
 if it should be there wether or not this is a pair to the ->escape()
 function.

 The plus of escape_by_ref() over escape() is that it uses
 mysql_real_escape_string. ->escape() fails to properly escape data to be
 used with the databse "because it makes problems" (that comment isn't in
 there any longer but the escaping problem is). so escape_by_ref() does
 indeed what it is documented for.

 so a) and b) should be answered, I can update the functions comments.

 then I would like to know if this function was created to save some
 memory.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10860#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list