diff --git a/src/Entity/User.php b/src/Entity/User.php index 1706fd0..74844f6 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -52,7 +52,12 @@ public function getId() */ public function setId($id) { - $this->id = (int) $id; + if (is_null($id)) { + $this->id = $id; + } + else { + $this->id = (int)$id; + } return $this; }