Prevent Doctrine error for malformed unsubscribe url

[MAILPOET-3670]
This commit is contained in:
Rostislav Wolny
2021-06-25 15:35:51 +02:00
committed by Veljko V
parent ed66dfc8e9
commit 32b2136864

View File

@ -385,7 +385,7 @@ class Pages {
}
private function getConfirmUnsubscribeContent() {
if (!$this->isPreview() && $this->subscriber === null) {
if (!$this->isPreview() && ($this->subscriber === null || $this->subscriber->id === null)) {
return '';
}
$queueId = isset($this->data['queueId']) ? (int)$this->data['queueId'] : null;