From 4ac5a749b065887813625f31f2ca7bf1270a5014 Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Sun, 1 Dec 2013 22:40:42 +1100 Subject: [PATCH] Register config as a service. --- core/Core.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/Core.php b/core/Core.php index 39a726b45..18f0b1891 100644 --- a/core/Core.php +++ b/core/Core.php @@ -84,8 +84,10 @@ require_once 'control/injector/Injector.php'; // Initialise the dependency injector as soon as possible, as it is // subsequently used by some of the following code -$default_options = array('locator' => 'SilverStripeServiceConfigurationLocator'); -Injector::inst($default_options); +$injector = new Injector(array('locator' => 'SilverStripeServiceConfigurationLocator')); +$injector->registerService(Config::inst()); + +Injector::set_inst($injector); /////////////////////////////////////////////////////////////////////////////// // MANIFEST