Opened 5 years ago
Last modified 2 years ago
#7267 reopened defect (bug)
Infinite recursion in get_category_parents() and _children()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch irish-coffee |
| Cc: |
Description
These two functions can get stuck in a recursion loop if there's an indirect category hierarchy loop like A -> B -> C -> A.
The patch keeps track of traversed IDs and prevents repetition - there's a name for the algorithm but it escapes me. It increases memory usage but probably not too much - certainly less than infinite recursion does.
Attachments (1)
Note: See
TracTickets for help on using
tickets.

(In [8299]) Prevent category looping. Props tellyworth. fixes #7267