While writing some code that was using forum_access.module for a few things, I encountered a bug in forum_access_access(). The static caching was only caching the result corresponding to the $tid passed in, and not caching results for different $type or $account values.

This could (and did in my case) result in incorrect information being returned by forum_access_access() on subsequent calls.

To fix this, I've patched against forum_access.module 5.x-1.9 to cache the other pertinent argument values along with the result they yield. Patch is attached.

CommentFileSizeAuthor
patch1.diff1.12 KBJosh Benner

Comments

salvis’s picture

Status: Needs review » Fixed

Committed to 1.x-dev — thanks, that was a serious bug!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.