Skip to content

Commit 9f570c9

Browse files
committed
Avoid the session usage if is_cli() in Validation getErrors()
1 parent 1b8c491 commit 9f570c9

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
@@ -608,7 +608,7 @@ public function getErrors(): array
608608
// If we already have errors, we'll use those.
609609
// If we don't, check the session to see if any were
610610
// passed along from a redirect_with_input request.
611-
if (empty($this->errors))
611+
if (empty($this->errors) && ! is_cli())
612612
{
613613
// Start up the session if it's not already
614614
if ( ! isset($_SESSION))

0 commit comments

Comments
 (0)