Opened 11 years ago
Closed 10 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: | pcfreak30 | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | Comments | Version: | 3.7 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
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
@
11 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
@
10 years ago
- Keywords has-patch needs-testing added
- Milestone Awaiting Review → 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
trunk/src/wp-includes/class-walker-comment.php?annotate=blame#L282
This was introduced in [25555] for #14856.