Changeset 2930
- Timestamp:
- 06/27/2008 02:28:42 PM (5 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Input.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Input.php
r2926 r2930 131 131 * @return mixed 132 132 */ 133 public function get($key , $default = NULL, $xss_clean = FALSE)133 public function get($key = array(), $default = NULL, $xss_clean = FALSE) 134 134 { 135 135 return $this->search_array($_GET, $key, $default, $xss_clean); … … 144 144 * @return mixed 145 145 */ 146 public function post($key , $default = NULL, $xss_clean = FALSE)146 public function post($key = array(), $default = NULL, $xss_clean = FALSE) 147 147 { 148 148 return $this->search_array($_POST, $key, $default, $xss_clean); … … 157 157 * @return mixed 158 158 */ 159 public function cookie($key , $default = NULL, $xss_clean = FALSE)159 public function cookie($key = array(), $default = NULL, $xss_clean = FALSE) 160 160 { 161 161 return $this->search_array($_COOKIE, $key, $default, $xss_clean); … … 170 170 * @return mixed 171 171 */ 172 public function server($key , $default = NULl, $xss_clean = FALSE)172 public function server($key = array(), $default = NULL, $xss_clean = FALSE) 173 173 { 174 174 return $this->search_array($_SERVER, $key, $default, $xss_clean); … … 186 186 protected function search_array(array $array, $key, $default = NULL, $xss_clean = FALSE) 187 187 { 188 if ($key === array()) 189 return $array; 190 188 191 // Get the value from the array 189 192 $value = isset($array[$key]) ? $array[$key] : $default;
