Ticket #7267 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Infinite recursion in get_category_parents() and _children()

Reported by: tellyworth Assigned to: anonymous
Priority: normal Milestone: 2.6
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

prevent-category-looping-r8296.patch (1.8 kB) - added by tellyworth on 07/09/08 04:54:59.

Change History

07/09/08 04:54:59 changed by tellyworth

  • attachment prevent-category-looping-r8296.patch added.

07/09/08 04:57:19 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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