Opened 6 weeks ago
Closed 6 weeks ago
#3698 closed defect (bug) (fixed)
Nested reply ancestors include an invalid zero ID
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.20 |
| Component: | Component - Replies | Version: | 2.6.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Create a topic with replies A, B, and C. Set B to reply to A, then C to reply to B. bbp_get_reply_ancestors( C ) returns [ B, A, 0 ]; the expected result is [ B, A ]. The root reply has no reply-to ID, but its post_parent is the topic, so the current loop appends zero before stopping.
Stop when the next reply-to ID is empty, preserving the existing loop detection and filter. Add a PHPUnit regression for root, one-level, and two-level reply chains.
This is present in the canonical 2.6.0 tag and branches/2.6. Fix in trunk and backport to branches/2.6 for 2.6.20. The wider reply test coverage is tracked in #3695.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 7807: