[wp-trac] [WordPress Trac] #47430: wp-db: Always adds a filter on every query

WordPress Trac noreply at wordpress.org
Thu Aug 1 02:24:17 UTC 2019


#47430: wp-db: Always adds a filter on every query
---------------------------+-----------------------------
 Reporter:  withinboredom  |       Owner:  SergeyBiryukov
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  5.3
Component:  Database       |     Version:  5.2.1
 Severity:  minor          |  Resolution:  fixed
 Keywords:  has-patch      |     Focuses:
---------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45707" 45707]:
 {{{
 #!CommitTicketReference repository="" revision="45707"
 Database: Use a strict comparison for `has_filter()` check in
 `wpdb::placeholder_escape()`.

 The filter is added with a priority of `0`, so a loose comparison had an
 unintended effect of adding the filter on every call.

 Props withinboredom.
 Fixes #47430.
 }}}

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


More information about the wp-trac mailing list