From 2a34081c5e1b8a86d2d3f87c3da69b9d580d6027 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Feb 2016 14:33:34 +0200 Subject: Pass CI_Config as a parameter to CI_URI constructor --- system/core/CodeIgniter.php | 2 +- system/core/URI.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 14f62edaa..84f224123 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -298,7 +298,7 @@ if ( ! is_php('5.4')) * Instantiate the URI class * ------------------------------------------------------ */ - $URI =& load_class('URI', 'core'); + $URI =& load_class('URI', 'core', $CFG); /* * ------------------------------------------------------ diff --git a/system/core/URI.php b/system/core/URI.php index 79cf640b9..7c93e36b7 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -96,9 +96,9 @@ class CI_URI { * * @return void */ - public function __construct() + public function __construct(CI_Config &$config) { - $this->config =& load_class('Config', 'core'); + $this->config = $config; // If it's a CLI request, ignore the configuration if (is_cli()) -- cgit v1.2.3-24-g4f1b