Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0506d2cb
Commit
0506d2cb
authored
Nov 07, 2014
by
Alex Pott
Browse files
Issue
#2370733
by chx: Fixed Contrib can not provide config storage.
parent
338c7914
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php
View file @
0506d2cb
...
...
@@ -18,16 +18,22 @@ class BootstrapConfigStorageFactory {
/**
* Returns a configuration storage implementation.
*
* @param $class_loader
* The class loader. Normally Composer's ClassLoader, as included by the
* front controller, but may also be decorated; e.g.,
* \Symfony\Component\ClassLoader\ApcClassLoader.
*
* @return \Drupal\Core\Config\StorageInterface
* A configuration storage implementation.
*/
public
static
function
get
()
{
public
static
function
get
(
$class_loader
=
NULL
)
{
$bootstrap_config_storage
=
Settings
::
get
(
'bootstrap_config_storage'
);
$storage_backend
=
FALSE
;
if
(
!
empty
(
$bootstrap_config_storage
)
&&
is_callable
(
$bootstrap_config_storage
))
{
return
call_user_func
(
$bootstrap_config_storage
);
$storage_backend
=
call_user_func
(
$bootstrap_config_storage
,
$class_loader
);
}
// Fallback to the DatabaseStorage.
return
self
::
getDatabaseStorage
();
return
$storage_backend
?:
self
::
getDatabaseStorage
();
}
/**
...
...
core/lib/Drupal/Core/DrupalKernel.php
View file @
0506d2cb
...
...
@@ -1171,7 +1171,7 @@ protected function getConfigStorage() {
// The active configuration storage may not exist yet; e.g., in the early
// installer. Catch the exception thrown by config_get_config_directory().
try
{
$this
->
configStorage
=
BootstrapConfigStorageFactory
::
get
();
$this
->
configStorage
=
BootstrapConfigStorageFactory
::
get
(
$this
->
classLoader
);
}
catch
(
\
Exception
$e
)
{
$this
->
configStorage
=
new
NullStorage
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment