[wp-trac] [WordPress Trac] #41925: Bring back, support and document %1$s support in wpdb->prepare

WordPress Trac noreply at wordpress.org
Tue Oct 31 12:56:59 UTC 2017


#41925: Bring back, support and document %1$s support in wpdb->prepare
--------------------------+-----------------------
 Reporter:  soulseekah    |       Owner:  pento
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.8.3
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------

Comment (by pento):

 In [changeset:"42066"]:
 {{{
 #!CommitTicketReference repository="" revision="42066"
 Database: Restore numbered placeholders in `wpdb::prepare()`.

 [41496] removed support for numbered placeholders in queries send through
 `wpdb::prepare()`, which, despite being undocumented, were quite commonly
 used.

 This change restores support for numbered placeholders (as well as a
 subset of placeholder formatting), while also adding extra checks to
 ensure the correct number of arguments are being passed to
 `wpdb::prepare()`, given the number of placeholders.

 Merges [41662], [42056] to the 3.9 branch.
 See #41925.
 }}}

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


More information about the wp-trac mailing list