[wp-trac] [WordPress Trac] #12942: Change str_replace to preg_replace for $wpdb->prepare function
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 10 11:42:05 UTC 2010
#12942: Change str_replace to preg_replace for $wpdb->prepare function
----------------------------------------+-----------------------------------
Reporter: gplaurin | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: General | Version: 2.9.2
Severity: normal | Resolution:
Keywords: database, prepare, sprintf |
----------------------------------------+-----------------------------------
Comment(by nacin):
%1$s only works if you single-quote them. I'd rather add inline docs that
say they should not be used, than to account for them.
As it is, the first two str_replace's are for misuse of prepare().
Accounting for %X$s seems to me like a wasteful regexp.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12942#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list