[wp-trac] [WordPress Trac] #11608: wpdb->prepare() is broken

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 25 23:00:29 UTC 2009


#11608: wpdb->prepare() is broken
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:  ryan                  
     Type:  defect (bug)  |      Status:  new                   
 Priority:  normal        |   Milestone:  3.0                   
Component:  Database      |     Version:  2.9                   
 Severity:  normal        |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by dd32):

 > does not work. you can not use regex to parse for the format tokens,
 looks broken to me.

 it is NEVER going to support every single oddball case you want to throw
 at it. You cannot use regex to create an ''efficient'' parser to combat
 every single item. I'm certainly not the first to admit that, And whilst
 its used elsewhere in WordPress, Its not needed here to parse a database
 query..

 That does however fix a bug, whilst not introducing more, It mearly misses
 other cases which are pretty hard to pick up, and incredibly rare.

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


More information about the wp-trac mailing list