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

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 26 13:16:52 UTC 2009


#10860: wpdb::escape_by_ref() is broken
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 Once upon a time there was established a function with parameters passed
 by reference to escape string data. The function was called
 escape_by_ref(). I assume this was done to save memory.

 Now the function looks like this:
 {{{
         /**
          * Escapes content by reference for insertion into the database,
 for security
          *
          * @since 2.3.0
          *
          * @param string $s
          */
         function escape_by_ref(&$string) {
                 $string = $this->_real_escape( $string );
         }
 }}}

 Additionally escape_by_ref() is not a pair with escape(). Maybe that was
 sometime?

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


More information about the wp-trac mailing list