From 1996c0dbefd282806b97fb6e221134f288b2c31d Mon Sep 17 00:00:00 2001 From: Ashley Rich Date: Mon, 13 Jan 2025 09:59:12 +0000 Subject: [PATCH] Fix: Undefined array key "contact" --- src/LEAccount.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LEAccount.php b/src/LEAccount.php index 464c88f..b9c08b4 100644 --- a/src/LEAccount.php +++ b/src/LEAccount.php @@ -133,7 +133,7 @@ private function getLEAccountData() { $this->id = isset($post['body']['id']) ? $post['body']['id'] : ''; $this->key = $post['body']['key']; - $this->contact = $post['body']['contact']; + $this->contact = isset($post['body']['contact']) ? $post['body']['contact'] : ''; $this->agreement = isset($post['body']['agreement']) ? $post['body']['agreement'] : ''; $this->initialIp = isset($post['body']['initialIp']) ? $post['body']['initialIp'] : ''; $this->createdAt = $post['body']['createdAt']; @@ -162,7 +162,7 @@ public function updateAccount($email) { $this->id = isset($post['body']['id']) ? $post['body']['id'] : ''; $this->key = $post['body']['key']; - $this->contact = $post['body']['contact']; + $this->contact = isset($post['body']['contact']) ? $post['body']['contact'] : ''; $this->agreement = isset($post['body']['agreement']) ? $post['body']['agreement'] : ''; $this->initialIp = isset($post['body']['initialIp']) ? $post['body']['initialIp'] : ''; $this->createdAt = $post['body']['createdAt'];