diff --git a/lib/Entities/NewsletterEntity.php b/lib/Entities/NewsletterEntity.php index 4aa27c4d71..38e365da8b 100644 --- a/lib/Entities/NewsletterEntity.php +++ b/lib/Entities/NewsletterEntity.php @@ -97,7 +97,7 @@ class NewsletterEntity { private $preheader = ''; /** - * @ORM\Column(type="json") + * @ORM\Column(type="json", nullable=true) * @var array|null */ private $body; diff --git a/lib/Entities/NewsletterTemplateEntity.php b/lib/Entities/NewsletterTemplateEntity.php index b7b8d5ba59..b859ba5028 100644 --- a/lib/Entities/NewsletterTemplateEntity.php +++ b/lib/Entities/NewsletterTemplateEntity.php @@ -39,7 +39,7 @@ class NewsletterTemplateEntity { private $categories = '[]'; /** - * @ORM\Column(type="json") + * @ORM\Column(type="json", nullable=true) * @Assert\NotBlank() * @var array|null */ diff --git a/lib/Entities/ScheduledTaskEntity.php b/lib/Entities/ScheduledTaskEntity.php index 2f8432b821..28a7abc6c4 100644 --- a/lib/Entities/ScheduledTaskEntity.php +++ b/lib/Entities/ScheduledTaskEntity.php @@ -58,7 +58,7 @@ class ScheduledTaskEntity { private $processedAt; /** - * @ORM\Column(type="json") + * @ORM\Column(type="json", nullable=true) * @var array|null */ private $meta; diff --git a/lib/Entities/SendingQueueEntity.php b/lib/Entities/SendingQueueEntity.php index 27add5e3cd..5821a5b317 100644 --- a/lib/Entities/SendingQueueEntity.php +++ b/lib/Entities/SendingQueueEntity.php @@ -72,7 +72,7 @@ class SendingQueueEntity { private $countToProcess = 0; /** - * @ORM\Column(type="json") + * @ORM\Column(type="json", nullable=true) * @var array|null */ private $meta; diff --git a/lib/Entities/SubscriberEntity.php b/lib/Entities/SubscriberEntity.php index 01a21a1474..12e52a937a 100644 --- a/lib/Entities/SubscriberEntity.php +++ b/lib/Entities/SubscriberEntity.php @@ -30,7 +30,7 @@ class SubscriberEntity { /** * @ORM\Column(type="bigint", nullable=true) - * @var int|null + * @var string|null */ private $wpUserId; @@ -133,14 +133,14 @@ class SubscriberEntity { * @return int|null */ public function getWpUserId() { - return $this->wpUserId; + return $this->wpUserId ? (int)$this->wpUserId : null; } /** * @param int|null $wpUserId */ public function setWpUserId($wpUserId) { - $this->wpUserId = $wpUserId; + $this->wpUserId = $wpUserId ? (string)$wpUserId : null; } /**