function _drupal_rewrite_settings_global

Same name and namespace in other branches
  1. 10 core/includes/install.inc \_drupal_rewrite_settings_global()
  2. 8.9.x core/includes/install.inc \_drupal_rewrite_settings_global()

Helper for drupal_rewrite_settings().

Makes the new settings global.

Parameters

array|null $ref: A reference to a nested index in $GLOBALS.

array|object $variable: The nested value of the setting being copied.

1 call to _drupal_rewrite_settings_global()
drupal_rewrite_settings in core/includes/install.inc
Replaces values in settings.php with values in the submitted array.

File

core/includes/install.inc, line 461

Code

function _drupal_rewrite_settings_global(&$ref, $variable) {
  if (is_object($variable)) {
    $ref = $variable->value;
  }
  else {
    foreach ($variable as $k => $v) {
      _drupal_rewrite_settings_global($ref[$k], $v);
    }
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.