You are here

function mailchimp_update_7001 in Mailchimp 7

Implements hook_update_N().

Fix for double serialized list data

File

./mailchimp.install, line 101
Install, update and uninstall functions for the mailchimp module.

Code

function mailchimp_update_7001() {
  $lists = variable_get('mailchimp_lists', array());
  if (!empty($lists)) {
    $unserialized_list = unserialize($lists);
    if ($unserialized_list) {
      variable_set('mailchimp_lists', $unserialized_list);
    }
  }
  return TRUE;
}