#47430 closed defect (bug) (fixed)
wp-db: Always adds a filter on every query
| Reported by: | withinboredom | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | Database | Version: | 5.2.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
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.
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Previous patch was incorrect