diff -u b/core/includes/errors.inc b/core/includes/errors.inc --- b/core/includes/errors.inc +++ b/core/includes/errors.inc @@ -288,10 +288,20 @@ /** * Returns the current error level. + * + * This function should only be used to get the current error level pre + * DRUPAL_BOOTSTRAP_KERNEL or before Drupal is installed. In all other + * situations the following code is preferred: + * @code + * Drupal::config('system.logging')->get('error_level'); + * @endcode + * + * @return string + * The current error level. */ function _drupal_get_error_level() { try { - return config('system.logging')->get('error_level'); + return Drupal::config('system.logging')->get('error_level'); } catch (Exception $e) { // During very early install the cache_config table does not exist. diff -u b/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc --- b/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -52,10 +52,10 @@ // otherwise, as it looks generic enough and way more user-friendly. $custom_theme = variable_get('maintenance_theme'); if (!$custom_theme) { - $config = config('system.theme'); + $config = Drupal::config('system.theme'); // A broken install might not return an object. if (is_object($config)) { - $custom_theme = config('system.theme')->get('default'); + $custom_theme = $config->get('default'); } } if (!$custom_theme) {