diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index f64447e..c2b9312 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -680,10 +680,14 @@ function _system_theme_settings_validate_path($path) { function system_theme_settings_submit($form, &$form_state) { // Exclude unnecessary elements before saving. form_state_values_clean($form_state); - $key = $form_state['values']['var']; - unset($form_state['values']['var']); + // Extract the name of the theme being configured from the submitted form + // values and remove it from a copy of the values, in order to not save it + // with the configuration values, but retain it for other possibly running + // form submission handlers after this one. + $key = $form_state['values']['var']; $values = $form_state['values']; + unset($values['var']); // If the user uploaded a new logo or favicon, save it to a permanent location // and use it in place of the default theme-provided file.