Commit 80081e7c authored by git's avatar git Committed by Shelane French
Browse files

Issue #2845407 by xumepadismal, imclean, donaldp, Christopher Riley, noopal,...

Issue #2845407 by xumepadismal, imclean, donaldp, Christopher Riley, noopal, shelane: Settings: Secondary ".well (normal)" value not being saved
parent a8ece22b
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -304,10 +304,14 @@ class ThemeSettings extends Config {
    // Retrieve a diff of settings that override the defaults.
    $diff = DiffArray::diffAssocRecursive($data, $this->defaults);

    // Ensure core features are always present in the diff. The theme settings
    // form will not work properly otherwise.
    // Ensure core features and complex (array) settings are always present in
    // the diff. The theme settings form will not work properly otherwise.
    // @todo Just rebuild the features section of the form?
    foreach (['favicon', 'features', 'logo'] as $key) {
    $core_settings = ['favicon', 'features', 'logo'];
    $complex_settings = array_keys(array_filter($diff, 'is_array'));
    $all_complex_settings = array_unique(array_merge($core_settings, $complex_settings));

    foreach ($all_complex_settings as $key) {
      $arrays = [];
      $arrays[] = isset($this->defaults[$key]) ? $this->defaults[$key] : [];
      $arrays[] = isset($data[$key]) ? $data[$key] : [];