From 52a87e506d4fc70bd5922b07a532852d28f28ab6 Mon Sep 17 00:00:00 2001 From: Mehdi Bounya Date: Thu, 17 May 2018 23:41:30 +0000 Subject: http:// to https:// --- system/core/Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core/Input.php') diff --git a/system/core/Input.php b/system/core/Input.php index 97a6be78f..34f080899 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -29,8 +29,8 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/) - * @license http://opensource.org/licenses/MIT MIT License + * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 * @filesource -- cgit v1.2.3-24-g4f1b From 65d3bff26a8e6342604f18caac70548f164a904d Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Fri, 22 Jun 2018 16:44:07 +0800 Subject: Using null comparison instead of isset(). Signed-off-by: tianhe1986 --- system/core/Input.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'system/core/Input.php') diff --git a/system/core/Input.php b/system/core/Input.php index 34f080899..81209d704 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -212,9 +212,8 @@ class CI_Input { */ public function post_get($index, $xss_clean = FALSE) { - return isset($_POST[$index]) - ? $this->post($index, $xss_clean) - : $this->get($index, $xss_clean); + $output = $this->post($index, $xss_clean); + return ($output !== NULL) ? $output : $this->get($index, $xss_clean); } // -------------------------------------------------------------------- @@ -228,9 +227,8 @@ class CI_Input { */ public function get_post($index, $xss_clean = FALSE) { - return isset($_GET[$index]) - ? $this->get($index, $xss_clean) - : $this->post($index, $xss_clean); + $output = $this->get($index, $xss_clean); + return ($output !== NULL) ? $output : $this->post($index, $xss_clean); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 82584355c38abd18b00878c8f860ea4e7e60bf12 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Tue, 26 Jun 2018 08:54:57 +0800 Subject: Using `isset`. Signed-off-by: tianhe1986 --- system/core/Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/core/Input.php') diff --git a/system/core/Input.php b/system/core/Input.php index 81209d704..7f5f2e91d 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -213,7 +213,7 @@ class CI_Input { public function post_get($index, $xss_clean = FALSE) { $output = $this->post($index, $xss_clean); - return ($output !== NULL) ? $output : $this->get($index, $xss_clean); + return isset($output) ? $output : $this->get($index, $xss_clean); } // -------------------------------------------------------------------- @@ -228,7 +228,7 @@ class CI_Input { public function get_post($index, $xss_clean = FALSE) { $output = $this->get($index, $xss_clean); - return ($output !== NULL) ? $output : $this->post($index, $xss_clean); + return isset($output) ? $output : $this->post($index, $xss_clean); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b