diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index 29beb766a21d..1d76ad9aacbf 100755 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -494,15 +494,23 @@ public function getOldInput(string $key) helper('array'); // Check for an array value in POST. - if (isset($_SESSION['_ci_old_input']['post']) && dot_array_search($key, $_SESSION['_ci_old_input']['post'])) + if (isset($_SESSION['_ci_old_input']['post'])) { - return dot_array_search($key, $_SESSION['_ci_old_input']['post']); + $value = dot_array_search($key, $_SESSION['_ci_old_input']['post']); + if ( ! is_null($value)) + { + return $value; + } } // Check for an array value in GET. - if (isset($_SESSION['_ci_old_input']['get']) && dot_array_search($key, $_SESSION['_ci_old_input']['get'])) + if (isset($_SESSION['_ci_old_input']['get'])) { - return dot_array_search($key, $_SESSION['_ci_old_input']['get']); + $value = dot_array_search($key, $_SESSION['_ci_old_input']['get']); + if ( ! is_null($value)) + { + return $value; + } } }