[wp-trac] [WordPress Trac] #19861: $wpdb->prepare() fails with localized floats

WordPress Trac wp-trac at lists.automattic.com
Mon May 14 18:07:45 UTC 2012


#19861: $wpdb->prepare() fails with localized floats
------------------------------------------+------------------------------
 Reporter:  laotse                        |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Database                      |     Version:  3.3.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |
------------------------------------------+------------------------------
Changes (by kurtpayne):

 * cc: kpayne@… (added)


Comment:

 This patch looks like a re-implementation of vsprintf, but with more
 validation. Since vsprintf already does sanitization, though, why do we
 need the extra regexes in this page?

 The original issue in the ticket was regarding in correct parsing of
 localized floats.  You mention `%F` in your patch, why not just use %F
 instead of %f and skip the extra work?

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


More information about the wp-trac mailing list