diff --git a/src/PROCERGS/LoginCidadao/CoreBundle/Entity/NfgProfile.php b/src/PROCERGS/LoginCidadao/CoreBundle/Entity/NfgProfile.php index a6b0784c4..3710b01bb 100644 --- a/src/PROCERGS/LoginCidadao/CoreBundle/Entity/NfgProfile.php +++ b/src/PROCERGS/LoginCidadao/CoreBundle/Entity/NfgProfile.php @@ -178,12 +178,12 @@ public function getVoterRegistrationSit() * @ORM\PrePersist * @ORM\PreUpdate */ - public function setUpdatedAt($var = NULL) + public function setUpdatedAt($updatedAt = null) { - if ($var === null) { - $this->updatedAt = new \DateTime(); + if ($updatedAt instanceof \DateTime) { + $this->updatedAt = $updatedAt; } else { - $this->updatedAt = $var; + $this->updatedAt = new \DateTime('now'); } return $this; }