Skip to content

Commit

Permalink
Merge pull request #127 from dlubitz/patch-1
Browse files Browse the repository at this point in the history
BUGFIX: Allow DateTime for unserialization of form state
  • Loading branch information
bwaidelich authored Dec 7, 2020
2 parents d72f3e9 + 406bf10 commit e04e788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Core/Runtime/FormRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function initializeFormStateFromRequest()
$this->formState = new FormState();
} else {
$serializedFormState = $this->hashService->validateAndStripHmac($serializedFormStateWithHmac);
$this->formState = unserialize(base64_decode($serializedFormState), ['allowed_classes' => [FormState::class]]);
$this->formState = unserialize(base64_decode($serializedFormState), ['allowed_classes' => [FormState::class, \DateTime::class, \DateTimeImmutable::class]]);
}
}

Expand Down

0 comments on commit e04e788

Please sign in to comment.