Commit 783caf38 authored by webchick's avatar webchick

Issue #1898236 by TwoD: Fixed Installing without English language leads to Fatal Error.

parent ba6d3fb7
......@@ -888,18 +888,18 @@ function drupal_get_filename($type, $name, $filename = NULL) {
// nothing
}
else {
if ($type == 'module') {
if (empty($files[$type])) {
$files[$type] = drupal_container()->get('module_handler')->getModuleList();
}
if (isset($files[$type][$name])) {
return $files[$type][$name];
}
}
// 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 ($type == 'module') {
if (empty($files[$type])) {
$files[$type] = drupal_container()->get('module_handler')->getModuleList();
}
if (isset($files[$type][$name])) {
return $files[$type][$name];
}
}
try {
$file_list = state()->get('system.' . $type . '.files');
if ($file_list && isset($file_list[$name]) && file_exists(DRUPAL_ROOT . '/' . $file_list[$name])) {
......
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