By default, SimpleXML returns an array for a blank tag like

<site_information></site_information>

This is not very intuitive, and it should return an empty string. It means we can not use an empty array as a return value from the config system, but I don't know how we would represent an empty array in XML anyways.

Files: 
CommentFileSizeAuthor
#7 drupal-empty_config_values_use_string_instead_of_array-1497088-7.patch5.7 KBacrollet
PASSED: [[SimpleTest]]: [MySQL] 35,692 pass(es). View
#4 drupal-empty_config_values_use_string_instead_of_array-1497088-4.patch747 bytesacrollet
FAILED: [[SimpleTest]]: [MySQL] 35,685 pass(es), 0 fail(s), and 96 exception(s). View
#1 drupal-empty_config_values_use_string_instead_of_array-1497088-1.patch623 bytesacrollet
FAILED: [[SimpleTest]]: [MySQL] 35,674 pass(es), 0 fail(s), and 96 exception(s). View

Comments

acrollet’s picture

Issue tags: +Configuration system
FileSize
623 bytes
FAILED: [[SimpleTest]]: [MySQL] 35,674 pass(es), 0 fail(s), and 96 exception(s). View

patch attached.

acrollet’s picture

Status: Active » Needs review

setting issue status.

heyrocker’s picture

Status: Needs review » Needs work

I like this patch, I would just like to see a comment added that the explicitly explains that we have to do this at all is because of SimpleXML's default behavior of returning an array instead of a string.

acrollet’s picture

Status: Needs work » Needs review
FileSize
747 bytes
FAILED: [[SimpleTest]]: [MySQL] 35,685 pass(es), 0 fail(s), and 96 exception(s). View

Comment added, patch attached.

heyrocker’s picture

Status: Needs review » Reviewed & tested by the community

If this comes back green then its good to go.

Status: Reviewed & tested by the community » Needs work
acrollet’s picture

FileSize
5.7 KB
PASSED: [[SimpleTest]]: [MySQL] 35,692 pass(es). View

patch attached with modifications to image to account for new code, tests run fine locally. *fingers crossed*

acrollet’s picture

Status: Needs work » Needs review
heyrocker’s picture

Status: Needs review » Reviewed & tested by the community

Sweeet

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Great job. :)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.