diff options
author | tianhe1986 <w1s2j3229@163.com> | 2018-06-22 10:44:07 +0200 |
---|---|---|
committer | tianhe1986 <w1s2j3229@163.com> | 2018-06-22 10:44:07 +0200 |
commit | 65d3bff26a8e6342604f18caac70548f164a904d (patch) | |
tree | c34d35156c71799c1aaaee952586bcd30c8a876d /system | |
parent | d0d4548c4b6917a3e389fb97acbc6123e2060ae2 (diff) |
Using null comparison instead of isset().
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Input.php | 10 |
1 files changed, 4 insertions, 6 deletions
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); } // -------------------------------------------------------------------- |