From dcd6f5153b7e7e6d798d5a77af65b7460f152e5c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 18:14:35 +0200 Subject: Isolate CI_Security instantiation from CI_Input; improve tests --- system/core/Input.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'system/core/Input.php') diff --git a/system/core/Input.php b/system/core/Input.php index aefc3b7d8..d881e253d 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -113,11 +113,10 @@ class CI_Input { * * @return void */ - public function __construct() + public function __construct(CI_Security &$security) { - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - $this->security =& load_class('Security', 'core'); + $this->_enable_csrf = (config_item('csrf_protection') === TRUE); + $this->security = $security; // CSRF Protection check if ($this->_enable_csrf === TRUE && ! is_cli()) -- cgit v1.2.3-24-g4f1b