diff --git a/src/Appwrite/Event/Message/Certificate.php b/src/Appwrite/Event/Message/Certificate.php index 0d889fde99..2ce07da556 100644 --- a/src/Appwrite/Event/Message/Certificate.php +++ b/src/Appwrite/Event/Message/Certificate.php @@ -21,8 +21,8 @@ readonly class Certificate extends Base public function toArray(): array { return [ - 'project' => $this->project, - 'domain' => $this->domain, + 'project' => $this->project?->getArrayCopy(), + 'domain' => $this->domain?->getArrayCopy(), 'skipRenewCheck' => $this->skipRenewCheck, 'validationDomain' => $this->validationDomain, 'action' => $this->action, diff --git a/src/Appwrite/Event/Message/Mail.php b/src/Appwrite/Event/Message/Mail.php index 99fa0df2fd..a7e85d63c7 100644 --- a/src/Appwrite/Event/Message/Mail.php +++ b/src/Appwrite/Event/Message/Mail.php @@ -26,7 +26,7 @@ readonly class Mail extends Base public function toArray(): array { return [ - 'project' => $this->project, + 'project' => $this->project?->getArrayCopy(), 'recipient' => $this->recipient, 'name' => $this->name, 'subject' => $this->subject,