|
|
@@ -422,9 +422,14 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[Groups(['my_access:input'])]
|
|
|
public function setHistorical(array $historical): self
|
|
|
{
|
|
|
- if (!$historical['past'] && !$historical['present'] && !$historical['future']) {
|
|
|
+ if (($historical['dateStart'] && !$historical['dateEnd']) || (!$historical['dateStart'] && $historical['dateEnd'])) {
|
|
|
+ $historical['dateStart'] = null;
|
|
|
+ $historical['dateEnd'] = null;
|
|
|
+ }
|
|
|
+ if (!$historical['past'] && !$historical['present'] && !$historical['future'] && !$historical['dateStart'] ) {
|
|
|
$historical['present'] = true;
|
|
|
}
|
|
|
+
|
|
|
$this->setting['historical'] = $historical;
|
|
|
return $this;
|
|
|
}
|