update_variables_to_config loses data when called on an existing config
with numeric keys. One such example is system.site -> page.403

Even if a completely unrelated key is updated with update_variables_to_config
the value of page.403 is lost. The reason for this is that update_variables_to_config
merges the default values with the stored ones and PHP renumbers any
numeric keys starting from 0.

I will attach a test that demonstrates the issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cspitzlay’s picture

Here is the test.
BTW: String keys work alright.

cspitzlay’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, demonstrate-fail-on-numeric-keys-1830424-1.patch, failed testing.

webflo’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, demonstrate-fail-on-numeric-keys-1830424-1.patch, failed testing.

aspilicious’s picture

I believe there is an issue for this already (with a solution)

cspitzlay’s picture

Status: Needs work » Closed (duplicate)