You are here

function devel_update_7004 in Devel 7

Convert devel_error_handler variable to devel_error_handlers array.

File

./devel.install, line 103

Code

function devel_update_7004() {
  define('DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE', 3);
  $error_handler = variable_get('devel_error_handler', NULL);
  if (isset($error_handler)) {
    if ($error_handler == DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE) {
      $error_handlers = array(
        DEVEL_ERROR_HANDLER_STANDARD,
        DEVEL_ERROR_HANDLER_BACKTRACE_KRUMO,
      );
    }
    else {
      $error_handlers = array(
        $error_handler,
      );
    }
    variable_del('devel_error_handler');
    variable_set('devel_error_handlers', drupal_map_assoc($error_handlers));
  }
}