_ctools_export_get_defaults use a static cache and is not resetable. In some special cache, default hook return different values in the same request (strongarm module, for example), so we need a way to reset the cache in _ctools_export_get_defaults.

Why don't we use $cache = &ctools_static(__FUNCTION__); ?

Comments

nquocbao’s picture

StatusFileSize
new1.18 KB

Here is the patch

nquocbao’s picture

StatusFileSize
new1.47 KB

Ignore the 1st patch. This one is correct.

merlinofchaos’s picture

Status: Active » Needs review

The primary answer to why we don't use ctools_static is that it was a latecomer to CTools and things using local static caches have only converted to the D7 backport on an as-needed basis. So, pretty much like this. =)

Setting proper status. I will review when I get a chance. Thanks!

merlinofchaos’s picture

Status: Needs review » Fixed

Looks like something like this patch went in with another change.

Status: Fixed » Closed (fixed)

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