From 89db7c7c7c93819e61afdb51767d3cc597a41e8c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 4 Feb 2016 20:41:53 +0900 Subject: [PATCH] Load system configuration before Context::init() --- classes/context/Context.class.php | 2 +- common/autoload.php | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 75c28d450..fafedb44f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -460,7 +460,7 @@ class Context // Load new configuration format. if ($config === null) { - $config = Rhymix\Framework\Config::init(); + $config = Rhymix\Framework\Config::getAll(); } if (!count($config)) { diff --git a/common/autoload.php b/common/autoload.php index c4925cc87..fc8f13b60 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -191,7 +191,9 @@ spl_autoload_register(function($class_name) /** * Also include the Composer autoloader. */ -if (file_exists(RX_BASEDIR . 'vendor/autoload.php')) -{ - require_once RX_BASEDIR . 'vendor/autoload.php'; -} +require_once RX_BASEDIR . 'vendor/autoload.php'; + +/** + * Load system configuration. + */ +Rhymix\Framework\Config::init();