Better disable()

Created on 12 July 2012, over 12 years ago
Updated 12 March 2025, 26 days ago

IMO the disable() function misses one line for a complete clean-up:

function field_encrypt_disable() {
   // clear the cache of existing data
   cache_clear_all('*', 'cache_field', TRUE);
 
   // set the old class for this bin, if there was one.
   $old_cache = variable_get('field_encrypt_old_cache', NULL);
   if ($old_cache===NULL) {
     variable_del('cache_class_cache_field');
   }
   else {
     variable_set('cache_class_cache_field', $old_cache);
   }
 }
+variable_del('field_encrypt_old_cache');
🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024