diff -u b/core/includes/install.inc b/core/includes/install.inc --- b/core/includes/install.inc +++ b/core/includes/install.inc @@ -307,6 +307,10 @@ } /** + * Helper for drupal_rewrite_settings(). + * + * Checks whether this token represents a scalar. + * * @param int $type * The token type * @see token_name(). diff -u b/core/modules/system/lib/Drupal/system/Tests/System/SettingsRewriteTest.php b/core/modules/system/lib/Drupal/system/Tests/System/SettingsRewriteTest.php --- b/core/modules/system/lib/Drupal/system/Tests/System/SettingsRewriteTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/SettingsRewriteTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\system\Tests\System\SettingsRewriteTest. + * Contains Drupal\system\Tests\System\SettingsRewriteTest. */ namespace Drupal\system\Tests\System; @@ -81,8 +81,8 @@ 'settings' => array( 'has_index_value_scalar' => array( 'foo' => array( - 'baz' => array( - '.value' => FALSE, + 'value' => array( + '.value' => array('value' => 2), '.required' => TRUE, '.comment' => 'comment', ), @@ -91,7 +91,9 @@ ), 'expected' => <<<'EXPECTED' $has_index_value_scalar["foo"]["bar"] = "foo"; -$has_index_value_scalar['foo']['baz'] = false; // comment +$has_index_value_scalar['foo']['value'] = array ( + 'value' => 2, +); // comment EXPECTED ), );