Skip to content

Commit a6fd7a1

Browse files
authored
Merge pull request #906 from natanfelles/cli_validation_session
Avoid the session usage if is_cli() in Validation getErrors()
2 parents 6e4a591 + 9f570c9 commit a6fd7a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Validation/Validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ public function getErrors(): array
613613
// If we already have errors, we'll use those.
614614
// If we don't, check the session to see if any were
615615
// passed along from a redirect_with_input request.
616-
if (empty($this->errors))
616+
if (empty($this->errors) && ! is_cli())
617617
{
618618
// Start up the session if it's not already
619619
if ( ! isset($_SESSION))

0 commit comments

Comments
 (0)