summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-07-22 15:38:42 +0200
committerGitHub <noreply@github.com>2018-07-22 15:38:42 +0200
commit29b2ac04223c701fdd21c7c900d0d65dc6fd6b9c (patch)
tree56274462d05b9e1da712decf316362f6148c5870 /system/core/Input.php
parentd0d4548c4b6917a3e389fb97acbc6123e2060ae2 (diff)
parent82584355c38abd18b00878c8f860ea4e7e60bf12 (diff)
Merge pull request #5531 from tianhe1986/develop_input_array_notation
Input: considering nested array keys in `get_post` and `post_get`
Diffstat (limited to 'system/core/Input.php')
-rw-r--r--system/core/Input.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 34f080899..7f5f2e91d 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 isset($output) ? $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 isset($output) ? $output : $this->post($index, $xss_clean);
}
// --------------------------------------------------------------------