[wp-trac] [WordPress Trac] #19861: $wpdb->prepare() fails with localized floats
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 23 01:05:26 UTC 2012
#19861: $wpdb->prepare() fails with localized floats
--------------------------+--------------------
Reporter: laotse | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Database | Version: 3.3.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Changes (by kurtpayne):
* keywords: needs-unit-tests has-patch => has-patch
Comment:
The patch to `prepare` didn't fully work. The `$args` array was passed
through `escape_by_ref` which stringified each element. `vsprintf` will
not properly convert (string) 0,7 to (string) 0.7. It will only work with
(float) 0,7. [[attachment:19861.3.patch]] addresses this.
Also added a unit test.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19861#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list