The example provided for hook_variable_info() looks like this:

function hook_variable_info($options) {
  $variables['site_name'] = array(
    'type' => 'string',
    'title' => t('Name', array(), $options),
    'default' => 'Drupal',
    'description' => t('The name of this website.', array(), $options),
    'required' => TRUE,
  );
  $variables['site_403'] = array(
    'type' => 'drupal_path',
    'title' => t('Default 403 (access denied) page', array(), $options),
    'default' => '',
    'description' => t('This page is displayed when the requested document is denied to the current user. Leave blank to display a generic "access denied" page.', array(), $options),
  );
  return $variables;
}

The problem is that the 'required' element listed for the 'site_name' is not documented in the docblock above it, so are the docs wrong or is the example wrong?

Comments

DamienMcKenna created an issue.