On a site using i18n, upgrading from 7.x-1.28 to 7.x-1.31 runs 3 hook_update_Ns and the eu_cookie_compliance variable gets reset.
In eu_cookie_compliance_update_7011, i18n_variable_set() executes variable_realm_refresh() which does a unset($GLOBALS['conf']['eu_cookie_compliance']);.
Then, in eu_cookie_compliance_update_7012, when variable_get('eu_cookie_compliance') is called, it returns empty array. When variable_set('eu_cookie_compliance') gets called, the empty array (with a few new values) is saved.
My suggestion is to use variable_realm_set() instead and explicitly turn off $rebuild:
variable_realm_set('language', $langcode, 'eu_cookie_compliance', $settings, FALSE);
Comments
Comment #2
bwaindwain commentedComment #3
bwaindwain commentedComment #4
bwaindwain commentedComment #5
bwaindwain commentedPossibly related to undefined variables on update to 1.31
Comment #7
svenryen commentedThanks for the patch.