diff --git a/system/core/Input.php b/system/core/Input.php index 4d73fa424f4..a3ad14e24c0 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -178,8 +178,13 @@ protected function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE) public function get($index = NULL, $xss_clean = FALSE) { // Check if a field has been provided - if ($index === NULL && ! empty($_GET)) + if ($index === NULL) { + if (empty($_GET)) + { + return array(); + } + $get = array(); // loop through the full _GET array @@ -205,8 +210,13 @@ public function get($index = NULL, $xss_clean = FALSE) public function post($index = NULL, $xss_clean = FALSE) { // Check if a field has been provided - if ($index === NULL && ! empty($_POST)) + if ($index === NULL) { + if (empty($_POST)) + { + return array(); + } + $post = array(); // Loop through the full _POST array and return it