Skip to content

Commit

Permalink
refactor: run rector
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 16, 2022
1 parent 0808880 commit 91ba73d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions system/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,8 @@ public function getErrors(bool $withSessionErrors = true): array

// Check the session to see if any were
// passed along from a redirect withErrors() request.
if (isset($_SESSION, $_SESSION['_ci_validation_errors'])) {
if (ENVIRONMENT === 'testing' || ! is_cli()) {
$this->errors = unserialize($_SESSION['_ci_validation_errors']);
}
if (isset($_SESSION, $_SESSION['_ci_validation_errors']) && (ENVIRONMENT === 'testing' || ! is_cli())) {
$this->errors = unserialize($_SESSION['_ci_validation_errors']);
}

return $this->errors;
Expand Down

0 comments on commit 91ba73d

Please sign in to comment.