Commit b05019fd authored by catch's avatar catch

Issue #2006024 by kgoel, rbayliss, wesleydv: Fixed drupal_container() is...

Issue #2006024 by kgoel, rbayliss, wesleydv: Fixed drupal_container() is deprecated, don't use it in bootstrap.php.
parent f9ec71df
......@@ -759,7 +759,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
// Verify that we have an keyvalue service before using it. This is required
// because this function is called during installation.
// @todo Inject database connection into KeyValueStore\DatabaseStorage.
if (($container = drupal_container()) && $container->has('keyvalue') && function_exists('db_query')) {
if (($container = Drupal::getContainer()) && $container->has('keyvalue') && function_exists('db_query')) {
if ($type == 'module') {
if (empty($files[$type])) {
$files[$type] = Drupal::moduleHandler()->getModuleList();
......@@ -2010,9 +2010,9 @@ function _drupal_bootstrap_configuration() {
* Initialize the kernel / service container.
*/
function _drupal_bootstrap_kernel() {
// Normally, index.php puts a container in drupal_container() by creating a
// Normally, index.php puts a container in the Drupal class by creating a
// kernel. If there is no container yet, create one.
if (!drupal_container()) {
if (!Drupal::getContainer()) {
$kernel = new DrupalKernel('prod', drupal_classloader());
$kernel->boot();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment