Skip to content

Commit

Permalink
fix: Fixed Setting value with \DateTimeInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Feb 9, 2024
1 parent 6cedde2 commit fa9acb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/RoadizCoreBundle/src/Entity/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function setValue($value)
$this->value = null;
} elseif (
($this->getType() === AbstractField::DATETIME_T || $this->getType() === AbstractField::DATE_T) &&
$value instanceof \DateTime
$value instanceof \DateTimeInterface
) {
$this->value = $value->format('c'); // $value is instance of \DateTime
} else {
Expand Down

0 comments on commit fa9acb5

Please sign in to comment.