diff --git a/src/Entity/Setting.php b/src/Entity/Setting.php index 482e25a0..2670a463 100644 --- a/src/Entity/Setting.php +++ b/src/Entity/Setting.php @@ -189,10 +189,7 @@ public function setValue(mixed $value): self { if (null === $value) { $this->value = null; - } elseif ( - ($this->getType() === AbstractField::DATETIME_T || $this->getType() === AbstractField::DATE_T) && - $value instanceof \DateTimeInterface - ) { + } elseif ($value instanceof \DateTimeInterface) { $this->value = $value->format('c'); // $value is instance of \DateTime } else { $this->value = (string) $value;