[wp-trac] [WordPress Trac] #41983: Lead by example: pass unquoted placeholders to $wpdb->prepare()

WordPress Trac noreply at wordpress.org
Thu Sep 28 08:16:38 UTC 2017


#41983: Lead by example: pass unquoted placeholders to $wpdb->prepare()
----------------------------+---------------------
 Reporter:  jrf             |       Owner:  pento
     Type:  task (blessed)  |      Status:  closed
 Priority:  normal          |   Milestone:  4.9
Component:  Database        |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:  docs
----------------------------+---------------------

Comment (by jrf):

 @pento Thanks for the commit.

 Should I open a new ticket for the still open question regarding
 documentation related improvements ? Or should this ticket stay open for
 that ?

 > I think the descriptive documentation could be improved a little as well
 to state that % wildcards to be used with LIKE should not be passed to the
 function as that is unclear unless you study the code sample.
 >
 > The wpdb->prepare() documentation should probably also be more explicit
 about how % wildcards in LIKE statements should be passed.

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


More information about the wp-trac mailing list