Skip to content

Commit

Permalink
docs: remove @todo
Browse files Browse the repository at this point in the history
GET/POST data and the Validation errors are used together when the validation errors occur.
So that withInput() also save the validation errors is not bad.
  • Loading branch information
kenjis committed Aug 21, 2022
1 parent 515152b commit f322d5d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions system/HTTP/RedirectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function back(?int $code = null, string $method = 'auto')
}

/**
* Specifies that the current $_GET and $_POST arrays should be
* packaged up with the response.
* Sets the current $_GET and $_POST arrays in the session.
* This also saves the validation errors.
*
* It will then be available via the 'old()' helper function.
*
Expand All @@ -94,22 +94,18 @@ public function withInput()
'post' => $_POST ?? [],
]);

// @TODO Remove this in the future.
// See https://github.com/codeigniter4/CodeIgniter4/issues/5839#issuecomment-1086624600
$this->withErrors();

return $this;
}

/**
* Set validation errors in the session.
* Sets validation errors in the session.
*
* If the validation has any errors, transmit those back
* so they can be displayed when the validation is handled
* within a method different than displaying the form.
*
* @TODO Make this method public when removing $this->withErrors() in withInput().
*
* @return $this
*/
private function withErrors(): self
Expand Down

0 comments on commit f322d5d

Please sign in to comment.