You are here

function configuration_set_error in Configuration Management 6

Set an error during configuration setup


$type: The type of error being set.

$vars: Any variables that are associated with the particular error

$cache: This will set the static $errors cache

Return value

If $type is set, the error(s) for that type are returned. If not the entire static cache is returned. //TODO Add a param to mark critical vs warning errors?

8 calls to configuration_set_error()
configuration_context_process_property in ./configuration.module
Process a single mapping config property. Various properties will mark static data that will be processed later on in the configuration phases.
configuration_enable_modules in ./configuration.module
Enable all of the provided modules
configuration_get_error in ./configuration.module
Get any errors that have happened during configuration
configuration_load_includes in ./configuration.module
Load all include files including the module configuration component files supplied by the configuration framework
configuration_process_action in ./configuration.module
Execute a single action

... See full list


./configuration.module, line 1225
Provide a unified method for defining site configurations abstracted from their data format. Various data formats should be supported via a plugin architecture such as XML, YAML, JSON, PHP


function configuration_set_error($type = null, $vars = array()) {

  // Use the configuration data store instead of our own static cache here
  $errors =& configuration_set_data('errors');
  if ($type) {
    $errors[$type][] = $vars;
  if ($type) {
    return $errors[$type];
  else {
    return $errors;