The argument to filter by taxonomy term breaks if the 'option' is not set to an integer <(60 - JOINed tables) and >=0. This is because the for loop doesn't stop till it reaches 100, which is more than MySQL's limit of 61 tables in JOIN queries.

This patch makes sure that $depth is set to an appropriate number and that the for loop that builds the long WHERE and JOIN clauses stops before the limit of 61 is reached.

If 'Option' is set inappropriately, like a non-integer, a negative integer or a large integer, it assumes infinite depth. It then uses taxonomy_get_tree() to find exactly how deep 'infinite' is for this term.

If 'Option' is not set, it assumes depth of 0, since managing infinite depth can be expensive.

Comments

esmerel’s picture

Status: Needs review » Closed (won't fix)

At this time, only security fixes will be made to the 5.x version of Views.