C() uses a static cache to return previously calculated results. However, the cache id used does not include all parameters and as such this function may return invalid values.

My specific case is that the search api may render a node using the anonymous user and oa_domains_url_outbound_alter() indirectly calls oa_domains_url_outbound_alter(). The result of oa_domains_url_outbound_alter() is cached in the database/memcached/redis by oa_core_get_parents_with_titles() and as such, having a bad result leads to permanent misbehavior until the cache is cleared.

Comments

Jorrit created an issue. See original summary.

Jorrit’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB
Jorrit’s picture

StatusFileSize
new1.71 KB

Another small change: $query->condition() selects between = and IN depending on the value provided, oa_core does not need to do this.

mpotter’s picture

Status: Needs review » Fixed

Thanks for catching this, committed to 14208d4.

Status: Fixed » Closed (fixed)

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