[wp-trac] [WordPress Trac] #42494: $wpdb->prepare placeholder count check is invalid for numbered placeholders

WordPress Trac noreply at wordpress.org
Thu Nov 9 21:30:19 UTC 2017


#42494: $wpdb->prepare placeholder count check is invalid for numbered placeholders
--------------------------+----------------------
 Reporter:  dominicp      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Database      |     Version:  4.8.3
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by pento):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 This is correct. While this usage technically works, it should be
 considered invalid going forward. Particularly as we explore moving to
 proper prepared queries (#42352), placeholders will need to be bound to
 individual values, rather than repeated values. (Naturally, the existing
 system will continue to work, but will eventually be deprecated.)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42494#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list