[wp-trac] [WordPress Trac] #47430: wp-db: Always adds a filter on every query
WordPress Trac
noreply at wordpress.org
Wed May 29 21:01:10 UTC 2019
#47430: wp-db: Always adds a filter on every query
---------------------------+-----------------------------
Reporter: withinboredom | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 5.2.1
Severity: minor | Keywords: has-patch
Focuses: |
---------------------------+-----------------------------
It appears that in the function `placeholder_escape` it adds a filter
`remove_placeholder_escape`. It adds a filter with the priority of `0`.
However, `has_filter` doesn't return `true` or `false`, it returns the
priority. Since the priority is 0, it always adds a filter on every call.
This issue is minor because WP_Hook prevents the infinite loop that would
occur, however, it still causes a small amount of memory to be used and
causes a small performance penalty.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47430>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list