Opened 7 years ago
Closed 7 years ago
#35433 closed defect (bug) (fixed)
Walker_Comment::comment calls comment_text which forces the comment to be re-queried rather than use $comments variable cache
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Comments | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
On line 282, by passing get_comment_id()
you are causing the comment to be re-fetched rather than pull from the $comments array. This causes the filter comments_array to be bypassed and possibly others. If This is changed to false, null, 0, etc it uses correct data.
Attachments (1)
Change History (7)
#2
@
7 years ago
Actually this is still present in the latest version. 3.7 did not fix this or I would not have opened the issue.
#3
@
7 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to Future Release
In 35433.diff instead of passing the comment_id, requiring the WP_Comment object to be re-fetched, I am passing in the WP_Comment object, which should prevent the additional query. @pcfreak30 would you be able to test the patch here?
Note: See
TracTickets for help on using
tickets.
trunk/src/wp-includes/class-walker-comment.php?annotate=blame#L282
This was introduced in [25555] for #14856.