From 8e37b8560c75d3994e59f401be977dcf386bb210 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 14 Dec 2016 13:13:05 +0200 Subject: Remove 'allow_get_array', 'standardize_newlines' config settings --- system/core/Input.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'system') diff --git a/system/core/Input.php b/system/core/Input.php index ec57cd448..a6be7b517 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -57,15 +57,6 @@ class CI_Input { */ protected $ip_address = FALSE; - /** - * Allow GET array flag - * - * If set to FALSE, then $_GET will be set to an empty array. - * - * @var bool - */ - protected $_allow_get_array = TRUE; - /** * Enable XSS flag * @@ -128,7 +119,6 @@ class CI_Input { */ public function __construct() { - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); @@ -149,13 +139,6 @@ class CI_Input { $this->security->csrf_verify(); } - if ( ! empty($_POST) && config_item('standardize_newlines') === TRUE) - { - array_walk_recursive($_POST, function(&$value) { - $value = preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $value); - }); - } - log_message('info', 'Input Class Initialized'); } @@ -598,11 +581,7 @@ class CI_Input { protected function _sanitize_globals() { // Is $_GET data allowed? If not we'll set the $_GET to an empty array - if ($this->_allow_get_array === FALSE) - { - $_GET = array(); - } - elseif (is_array($_GET)) + if (is_array($_GET)) { foreach ($_GET as $key => $val) { -- cgit v1.2.3-24-g4f1b