From 36d40978c89e0a5a8d8e582407a97523e9527b51 Mon Sep 17 00:00:00 2001 From: Eric Richer Date: Tue, 12 Mar 2024 16:16:49 -0400 Subject: [PATCH] Fixes issue #50 --- src/Entity/User.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }