_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__); ?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ctools_export_reset.patch | 1.47 KB | nquocbao |
| #1 | ctools_export_reset.patch | 1.18 KB | nquocbao |
Comments
Comment #1
nquocbao commentedHere is the patch
Comment #2
nquocbao commentedIgnore the 1st patch. This one is correct.
Comment #3
merlinofchaos commentedThe 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!
Comment #4
merlinofchaos commentedLooks like something like this patch went in with another change.