mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: Only unregister the relevant class when adding an extension.
This fixes an issue where the Config instance could not be injected, as it would be immediately cleared.
This commit is contained in:
parent
aeb8814ddc
commit
b7b041b435
@ -550,7 +550,7 @@ abstract class Object {
|
|||||||
Config::inst()->update($class, 'extensions', array($extension));
|
Config::inst()->update($class, 'extensions', array($extension));
|
||||||
Config::inst()->extraConfigSourcesChanged($class);
|
Config::inst()->extraConfigSourcesChanged($class);
|
||||||
|
|
||||||
Injector::inst()->unregisterAllObjects();
|
Injector::inst()->unregisterNamedObject($class);
|
||||||
|
|
||||||
// load statics now for DataObject classes
|
// load statics now for DataObject classes
|
||||||
if(is_subclass_of($class, 'DataObject')) {
|
if(is_subclass_of($class, 'DataObject')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user