1 bootstrap.inc variable_del($name)

Unsets a persistent variable.

Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.

Parameters

$name: The name of the variable to undefine.

Deprecated

since 1.0

See also

variable_get()

variable_set()

File

core/includes/bootstrap.inc, line 1281
Functions that need to be loaded on every Backdrop request.

Code

function variable_del($name) {
  global $conf;

  watchdog_deprecated_function('bootstrap', __FUNCTION__);

  db_delete('variable')
    ->condition('name', $name)
    ->execute();
  cache('bootstrap')->delete('variables');

  unset($conf[$name]);
}