function rules_forms_update_7102 in Rules Forms Support 7.2
Same name and namespace in other branches
- 7 rules_forms.install \rules_forms_update_7102()
Removes empty values from rules_forms_event_info.
Unset rules_forms_event_info array values with empty keys to cleanse the settings array of bad form information.
See also
http://drupal.org/node/1447328#comment-5640172
File
- ./
rules_forms.install, line 94 - Installation function for Rules Forms module.
Code
function rules_forms_update_7102() {
$event_info = variable_get('rules_forms_event_info', array());
foreach ($event_info as $key => $value) {
// Any form of empty key is unwanted (NULL, 0, FALSE, '', etc).
if (empty($key)) {
unset($event_info[$key]);
}
}
variable_set('rules_forms_event_info', $event_info);
}